]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-quic: prevent BUG_ON() on aborted uni stream close quic-interop flx04/quic-interop
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 20 Jan 2026 18:00:37 +0000 (19:00 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 21 Jan 2026 13:01:12 +0000 (14:01 +0100)
commitc7004be9640d6ccb0aa9e1fb15bfa38f6bff1ad3
tree682758935f24f7625720769240fb65d917437fb0
parenteb5279b15470d187061b1d7be3512ca6178eba0c
BUG/MEDIUM: mux-quic: prevent BUG_ON() on aborted uni stream close

When a QCS instance is fully closed on qcs_close_remote() invokation, it
is moved into purg_list for later cleanup. This reuses <el_send> list
element, so a BUG_ON() ensures that QCS is not already present in
send_list.

This code is safe for bidirectional streams, as local channel is only
closed after FIN or RESET_STREAM emission completion, so such QCS won't
be present in the send_list on full closure.

However, things are different for remote uni streams. As such streams do
not have any local channel, qcs_close_remote() will always proceed to
full closure. Most of the time this is fine, but the aformentionned
BUG_ON() could be triggered if emission is required on a remote uni
stream : this only happens after read was aborted and a STOP_SENDING
frame is prepared.

Fix this by adding an extra operation in qcs_close_remote() : on full
close, STOP_SENDING is cancelled if it was prepared and the QCS instance
is removed from send_list. This is safe as STOP_SENDING is unnecessary
after the remote channel is closed. This operation is performed before
purg_list insertion which prevents the BUG_ON() crash issue.

This patch must be backported up to 3.1.
src/mux_quic.c