]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: mux-quic: fix QMux Rx buffer leak on MUX init failure
authorOlivier Houchard <ohouchard@haproxy.com>
Wed, 18 Nov 2026 15:55:27 +0000 (16:55 +0100)
committerOlivier Houchard <cognet@ci0.org>
Wed, 18 Nov 2026 16:07:16 +0000 (17:07 +0100)
commite09666921589c4bf0ef63c9fcfcb95af79637974
tree5fe90d72034797027792a7624443ec10a99613ac
parent114010a7fe097c3c86f3ee1d0dd74960ddddcda7
BUG/MINOR: mux-quic: fix QMux Rx buffer leak on MUX init failure

On QMux, qcm_init() takes over the Rx buffer of the xprt layer. When it
fails later, its error path resets qcc->conn before calling
qcc_release(), which only releases the QMux connection buffers when a
connection is attached, so the Rx buffer is leaked. A client connecting
with TLS but without ALPN to a "proto qmux" listener makes
qcc_install_app_ops() fail and leaks one buffer per connection.

Let's release the QMux Rx buffer in the qcm_init() error path, where the
connection type is still known. The Tx one cannot be allocated yet.

This was introduced in 3.4 by commit 81f22cd68 ("MINOR: mux-quic: define
Rx connection buffer for QMux") and must be backported to 3.4.
src/mux_quic.c