]> git.kaiwu.me - haproxy.git/commit
REGTESTS: quic: backend must drop packets with an unsupported version
authorFrederic Lecaille <flecaille@haproxy.com>
Wed, 18 Nov 2026 16:39:29 +0000 (17:39 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Wed, 18 Nov 2026 17:00:24 +0000 (18:00 +0100)
commite55a181e96a9446390bc4c6bf5a5641b326081cc
tree4e95b71fc3b964fd930ef23d5ed90e35b7ca49b8
parent711e0e740ca8dfa6166119a4d921c7469d0bb652
REGTESTS: quic: backend must drop packets with an unsupported version

On backend connections, quic_rx_pkt_parse() accepts long header packets
carrying an unsupported version, since the version checks only apply to
listeners. Such packets keep QUIC_PACKET_TYPE_UNKNOWN, which maps to no
encryption level, and reach BUG_ON(!qel || !pktns) in qc_enc_level_alloc()
from qc_try_rm_hp().

A server which does not support the negotiated version answers with a
Version Negotiation packet (RFC 9000 6.1), so no malicious peer is needed.

The test starts a socket that replies to the Initial with a long header
packet using an unsupported version, and checks that the request fails with
a 503 instead of killing the process. It needs no helper beyond python3, so
it carries no #REGTEST_EXTRA directive.

Covers f12c7c7d9.
reg-tests/quic/unknown_version_backend.py [new file with mode: 0644]
reg-tests/quic/unknown_version_backend.vtc [new file with mode: 0644]