]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: mux-quic: prevent send corruption on buf realign
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 21 Oct 2026 13:47:59 +0000 (15:47 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 21 Oct 2026 15:49:01 +0000 (17:49 +0200)
commit0b8c835174881301e9955330d2c06529ca161c23
treecc577a2c4b63aab175727745c5545d2016610bac
parent36d85198a3a114c41786b12c35df9575235dd67c
BUG/MINOR: mux-quic: prevent send corruption on buf realign

For QUIC MUX emission, frames prepared for sending are not rebuilt each
time qcc_io_send() is called. This was first implemented for pacing and
the principle was generalized by the following patch, so the frame list
is now preserved if emission is interrupted on pacing, transient
transport error or flow control limitation.

  14710b5e6bf76834343d58db22e00b72590b16fe
  MEDIUM/OPTIM: mux-quic: do not rebuild frms list on every send

It is necessary to reset the frames list if some action occured during
an emission in several steps, for example when new data from upper layer
is available for sending or flow control limit is extended.

Prepared frames directly point to each QCS Tx buffer. Thus if buf
realign is performed, related frame will point to an incorrect location
in the buffer, resulting in an invalid data transfer. Note that this
issue is most of the time adverted by the fact that frames list is
resetted via qcc_send_stream() which most of the time directly follow a
realign operation.

Fix this by refreshing the frames list also during Tx buf realign. This
is simply implemented via a call to qcc_clear_frms(). It is currently
not possible to only clear the single QCS frame, as next emission would
only use already generated frames from other streams.

This must be backported up to 3.2.
src/mux_quic.c