]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: quic-be: CID double free upon qc_new_conn() failures
authorFrederic Lecaille <flecaille@haproxy.com>
Thu, 12 Jun 2025 08:59:35 +0000 (10:59 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Thu, 12 Jun 2025 09:45:21 +0000 (11:45 +0200)
commit869fb457ed4aca542df68b58ab7d6914732f6ab5
tree44c20cab12ec2e8be35343b7d6853062d1a38a53
parentdc3fb3a7318ab3d844db70f55ca2fc51af5dd64e
BUG/MINOR: quic-be: CID double free upon qc_new_conn() failures

This issue may occur when qc_new_conn() fails after having allocated
and attached <conn_cid> to its tree. This is the case when compiling
haproxy against WolfSSL for an unknown reason at this time. In this
case the <conn_cid> is freed by pool_head_quic_connection_id(), then
freed again by quic_conn_release().

This bug arrived with this commit:

    MINOR: quic-be: QUIC connection allocation adaptation (qc_new_conn())

So, the aim of this patch is to free <conn_cid> only for QUIC backends
and if it is not attached to its tree. This is the case when <conn_id>
local variable passed with NULL value to qc_new_conn() is then intialized
to the same <conn_cid> value.
src/quic_conn.c