]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: quic-be: drop long header packets with unsupported version
authorWilliam Dauchy <wdauchy@gmail.com>
Thu, 12 Nov 2026 16:50:46 +0000 (17:50 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Thu, 12 Nov 2026 17:06:50 +0000 (18:06 +0100)
commitf12c7c7d9f0d0b7880d021924d2f056d1303fe05
treed37a71f2e3f0d5838bdd609f962e57c587bd994a
parente51c393f8fd5cb2898f7a241a0d38b4be61cefaf
BUG/MINOR: quic-be: drop long header packets with unsupported version

On backend connections, quic_rx_pkt_parse() accepts long header packets
with an unsupported version and Version Negotiation packets, as these
checks only apply to listeners. Such packets keep the
QUIC_PACKET_TYPE_UNKNOWN type, which maps to no encryption level, and hit
BUG_ON(!qel || !pktns) in qc_enc_level_alloc() from qc_try_rm_hp(), or a
NULL dereference without DEBUG_STRICT.

No malicious peer is required: a server which does not support the
version selected by haproxy responds with a Version Negotiation packet
(RFC 9000 6.1). A malicious server or an on-path attacker may also send a
packet with an unsupported version.

Drop these packets on backend connections, as required by RFC 9000 5.2.1,
since version negotiation is not supported on the backend side. To do
so, export quic_version_VN_reserved and compare the packet version to it
instead of testing a null version number.

This should be backported up to 3.3, where it was introduced by 43d88a44f
("MINOR: quic-be: Datagrams and packet parsing support").

Signed-off-by: William Dauchy <wdauchy@gmail.com>
include/haproxy/quic_conn-t.h
src/quic_rx.c