]> git.kaiwu.me - haproxy.git/commit
BUG/MAJOR: mux-h2: fail on impossible data transfers in rcv_buf()
authorWilly Tarreau <w@1wt.eu>
Tue, 17 Nov 2026 17:27:58 +0000 (18:27 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 17 Nov 2026 17:38:15 +0000 (18:38 +0100)
commit3db16867932cc06fb62de2fca724959ee36ecc2f
tree61d5cb4fe4e05a3efb5572984969ce35f6af0244
parent91f333d5807e4f92e6dd05de4e2738592d28307f
BUG/MAJOR: mux-h2: fail on impossible data transfers in rcv_buf()

When some data couldn't be transferred from the rxbuf to the channel,
leaving the channel empty (e.g. due to the reserve), we must not set
SE_FL_WANT_ROOM otherwise we cannot get out of this situation. There's
even already a BUG_ON() for this. However it turns out that in some
tricky circumstances it can be triggered. The test is thus not correct
and instead we should simply report a stream error.

This needs to be backported as far as 2.6.

Many thanks to Adam Crawford for reporting this issue along with a
repro and a candidate fix. In the end the current fix is different
as it addresses the root cause (WANT_ROOM + no-data) so it should
be more future-proof.
src/mux_h2.c