]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: mux_quic: fix crash on QCS double remote close
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 21 Oct 2026 07:34:57 +0000 (09:34 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 21 Oct 2026 11:49:21 +0000 (13:49 +0200)
commit1dcaae1caf62b97789e77acb18c7b22753391d45
tree8567489a2f0659827410bb766baa7609bdbcf50c
parent8d523c5e83e7193d9e202dd914227d9291a3e230
BUG/MEDIUM: mux_quic: fix crash on QCS double remote close

A QCS instance must only be closed remotely once. A BUG_ON() enforces
it, so that FIN signalling to the upper layer is correct.

There exists a possible case of a double remote closure after data
transfer between two adjacent buffers on parser blocking. This only
happens if the next buffer is emptied and a standalone FIN is then
received. First qcs_close_remote() will be called during the empty
STREAM FIN reception. This is called again on qcc_decode_qcs() after
consuming data when dealing with the empty remaining buffer.

This patch fixes this by preventing the second call to
qcs_close_remote() in case an empty buffer is detected.

This bug is not easily reproducible as it is highly dependent on the
precise order of these different operations.

This must be backported up to 3.2, as this is the first release which
support multiple QCS Rx buffers.
src/mux_quic.c