]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: mux-quic: fix crash with double qcc_set_error() on QCS free quic-interop
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 27 Nov 2026 16:14:38 +0000 (17:14 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 30 Nov 2026 10:03:43 +0000 (11:03 +0100)
commitf52fdf6fa2e7939f9e75a312258074fb1f07739b
tree051f735a72c7ba89dbaef13e3bd32445b6e130c9
parentcacc949f5c60bafcfa9b703152a0223227b45337
BUG/MINOR: mux-quic: fix crash with double qcc_set_error() on QCS free

The following patch adjusts connection flow-control when a QCS is
released early with unconsumed data. While it is still incomplete in
some situations, it may prevent desync between client and server
flow-control levels.

  9d2af5174bc8b01e3c4b7b7604d75873ff4bc0e3
  BUG/MINOR: mux_quic: account data in conn fctl on early detach

However, this can cause a crash if qcs_destroy() has been called while
the connection is already flagged on error. Indeed, in case of frame
allocation failure in qcc_account_for_conn_fctl(), qcc_set_error() is
called a second time, which is forbidden and enforced by a BUG_ON()
statement.

Fix this by skipping the qcc_account_for_conn_fctl() call if the
connection is already on error. This is also the case if a failure
occurs during qcc_release_remote_stream() as it sometimes also perform
faillible frame allocation. Both fixes are valid as we do not care about
flow-control accounting anymore as the connection will be released soon.

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