]> git.kaiwu.me - haproxy.git/commit
BUG/MAJOR: mux_quic: fix potential crash on RESET_STREAM receive
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 25 Sep 2026 14:03:07 +0000 (16:03 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 28 Sep 2026 09:21:19 +0000 (11:21 +0200)
commita33abe9e8300e17fa106f0d0d6160fbd8ed13880
tree81cd1ae68d9da811cb98faba06d76d6e3aa6a845
parent82a9570b3d8e02935450cf8f6adb3c32400322ac
BUG/MAJOR: mux_quic: fix potential crash on RESET_STREAM receive

When a RESET_STREAM frame is received and upper layer is not allocated,
QCS instance is immediately locally closed and inserted into QCC purge
list. This operation has been performed since the following patch.
Before, the QCS would remain allocated and could possibly prevent the
connection closure if accounted as a request stream.

  commit b7e0aa231aa7af214c97f9540f7bba8498898b11
  BUG/MAJOR: mux_quic: fix leak on RESET_STREAM reception

Sadly, this causes a crash if QCS is already inserted in QCC send list.
This is because <el_send> element is used both for send and purge list,
as a QCS cannot be present in both at the same time.

Fix this skipping insertion in purge list if QCS is already present in
the send list. QCS is not closed locally either in this case. This
allows the QCS to finalize its emission before being closed and purged.

This latter case requires to extend check in qcm_ctrl_send() for QCS
purging when everything is emitted. This is now also performed if a
RESET_STREAM has been received and upper stream layer is not present.

These modifications reveal that it is probably not valid to silently
close a QCS without notifying the peer. Reaction to a RESET_STREAM is in
fact dependent on the application layer protocol and the QUIC stream
type. For now, the current code base should ensure that a bidi HTTP/3
stream is not kept forever after peer reset. A more thoughtful approach
may be implemented later in a future patch.

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