]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: h3: fix end-of-input report on DATA wrapping
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 7 Oct 2026 13:31:40 +0000 (15:31 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 8 Oct 2026 12:10:03 +0000 (14:10 +0200)
commitbcdbc399d34f82a21c49162f203f2ff16b0aed79
tree51c7080aa47b3a075a935d129f202a0767d7d385
parent19a5382e0022b3e79baef4194961997acb251a96
BUG/MEDIUM: h3: fix end-of-input report on DATA wrapping

A received H3 DATA frame may wrap in the buffer. Function
h3_data_to_htx() will parse it in two pass in this case, calling
htx_add_data() twice.

A double bug was present in case of such parsing as second call of
htx_add_data() return value was immediately added in <htx_sent>. This
could cause first check to activate QC_SF_DEM_FULL to be ignored. This
is a minor issue, as MUX would immediately reinvoke h3_rcv_buf(), with
the flag set this time.

The second bug is more important : comparison for HTX EOM reporting was
invalid in case of a two pass parsing. Most of the time, this result in
EOM not reported, causing the stream layer to report a stream
interruption with state CL--.

Fix this by using an intermediary return value for the second
htx_add_data() invokation. This value is only added to <htx_sent> once
necessary checks are performed. It is important to keep h3_data_to_htx()
to still return the total value of HTX added data to avoid parser desync
issue.

This must be backported up to 2.6, after a period of observation.
src/h3.c