]> git.kaiwu.me - haproxy.git/commit
BUG/MEDIUM: quic-be: keep the source port range of a closing backend connection
authorFrederic Lecaille <flecaille@haproxy.com>
Fri, 13 Nov 2026 17:26:44 +0000 (18:26 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Tue, 17 Nov 2026 08:35:15 +0000 (09:35 +0100)
commit41d9ab959a4cc14c99dffeb36ebd023294aeca93
tree2b471a87b03f42deef4876236dd1c6369b1d7cb6
parent2335f91969c5c1c32db077a4507ab3e2222b8459
BUG/MEDIUM: quic-be: keep the source port range of a closing backend connection

When a backend QUIC connection enters the closing state, qc_new_cc_conn()
moves its socket to a new quic_conn_closed instance. Since commit 02b768501
("MEDIUM: fd: Remove fdinfo"), the source port range used to bind that
socket is stored in qc->sport_range, but this member was not copied to the
closing connection, and the quic_conn_closed pool is not zeroed.

qc_release_fd() later installs qc->sport_range as the fd owner with
FD_OWNER_PR, so that fd_delete() gives the port back to its range. With an
uninitialized pointer, port_range_release_port() dereferences a wild address
and the process dies on a general protection fault; when the field happens
to be zero, the port is never released, so the range is exhausted after as
many connections and every new backend connection fails with
CO_ER_PORT_RANGE.

Copy the source port range to the closing connection, as is already done for
the other members it needs. It is always NULL on the frontend side.

This bug was introduced by commit 02b768501, so it only affects 3.5-dev4 and
later. No backport is needed.
src/quic_conn.c