]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: mux_quic: prevent BE reuse with an errored conn quic-interop flx04/quic-interop
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 28 May 2026 13:55:56 +0000 (15:55 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 28 May 2026 15:36:05 +0000 (17:36 +0200)
commit1cf1a0c8b14a064d8c1f4f87fc57dc69d9c612f8
tree0fdb68f826ada54a132d03d76d6fe562d9ff6732
parentc76e0f1bc4d1022b93af2a2e677343b63f45a688
BUG/MINOR: mux_quic: prevent BE reuse with an errored conn

When a backend connection is reused, qcm_strm_attach() callback is used.
A BUG_ON() is present to ensure that the connection is not already on
error. This should be guaranteed by the fact that idle insertion is
skipped for such connections.

However, when a connection is flagged on error, it is not immediately
removed from its idle/avail pool. Thus, there is a risk that it is
reused, triggering the aformentioned BUG_ON() statement.

This issue should be avoided via avail_streams callback which should
return 0, forcing the caller to cancel the connection reuse. In QUIC,
this callback implementation relies on internal qcc_be_is_reusable().
However, it lacked checks for error status.

To fix this, extend qcc_be_is_reusable() to properly check connection
errors or an expired timeout.

Previously, these parameters were already checked by qcc_is_dead(). As
it also relies on qcc_be_is_reusable(), this patch also rearranges it to
avoid duplicate checks for backend connections.

This should be backported up to 3.3.
src/mux_quic.c