]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: mux-h1: don't dereference a NULL opposite sedesc in h1_fastfwd()
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 7 Oct 2026 09:00:48 +0000 (11:00 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 16 Oct 2026 17:10:26 +0000 (19:10 +0200)
commit9ab8039d06ad2d1a3d20558372c7a8a91189f0bd
treef752b5d79a31d0aff6dfb2771006d7edf128a014
parent719af3dbd7e23950758a546506f6bcec085767fa
BUG/MINOR: mux-h1: don't dereference a NULL opposite sedesc in h1_fastfwd()

In h1_fastfwd(), when the opposite stream endpoint descriptor cannot be
retrieved, the function jumps to the "out" label, which unconditionally
dereferences <sdo> (iobuf flags and se_done_ff()), leading to a NULL pointer
dereference.

It is probably not reachable today, because fast-forwarding is only
attempted when the opposite endpoint announced it can consume fast-forwarded
data, which implies both sides are linked. But the error path is wrong
anyway. Now the fast-forwarding is aborted in this case, like when nothing
can be done, so that the regular receive path is used instead.

This patch may be backported as far as 3.0 if needed.
src/mux_h1.c