]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: tcpcheck/spoe: bound the SPOP error code to valid values
authorWilly Tarreau <w@1wt.eu>
Sun, 24 May 2026 16:14:50 +0000 (18:14 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 25 May 2026 08:16:06 +0000 (10:16 +0200)
commitbbef74fb21c4a7af95f138476d4ce42c9e698a57
tree8e0815164e573ba7818d94fe3c8f78e7035ef0a3
parent608951844e496f595cb1c8f299506dc41908147f
BUG/MEDIUM: tcpcheck/spoe: bound the SPOP error code to valid values

tcpcheck_spop_expect_hello() stores the SPOA agent-supplied status-code
varint directly into check->code (signed short) without range validation.
The code is later used as an index into spop_err_reasons[100]. Let's
just replace invalid status codes with SPOP_ERR_UNKNOWN to avoid any
problem.

The SPOP tcp-check was introduced in 3.1 so this fix must be backported
to 3.2.
src/tcpcheck.c