]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: net_helper: fix out-of-bounds read in tcp_fullhdr_find_opt
authorWilly Tarreau <w@1wt.eu>
Wed, 29 Apr 2026 07:31:27 +0000 (09:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 29 Apr 2026 13:11:44 +0000 (15:11 +0200)
commit9ed6a121a9ce0999fdfa1dc7d8a67eacc53d062b
treed3f3ec40d564d36e4481b68a9e4ac1da62c5e08d
parent465dca8e81e9db695880beda1dd973a794074895
BUG/MINOR: net_helper: fix out-of-bounds read in tcp_fullhdr_find_opt

tcp_fullhdr_find_opt() reads smp->data.u.str.area[next + 1] without
checking that next + 1 < len. When the last byte of a TCP header's
options section (at index len - 1) contains an option type that is not
0 (EOL) and not 1 (NOP), the code reads one byte past the valid buffer,
which is an out-of-bounds read, which in practice is totally harmless
but should be fixed.

This can be backported where tcp_fullhdr_find_opt() was backported.
src/net_helper.c