]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: quic: strengthen BUG_ON() for unpad Initial packet on client
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 2 Sep 2025 07:22:24 +0000 (09:22 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 2 Sep 2025 08:41:49 +0000 (10:41 +0200)
commit36d28bfca36e164d4d669c62069861f004dc05e3
treef212dfaf75bc75a698785339c9818bd778aefe07
parent209a54d5394c4104e7ebc6368baaa69869008f75
MEDIUM: quic: strengthen BUG_ON() for unpad Initial packet on client

To avoid anti-amplification limit, it is required that Initial packet
are padded to be at least 1.200 bytes long. On server side, this only
applies to ack-eliciting packets. However, for client side, this is
mandatory for every packets.

This patch adjusts qc_txb_store() BUG_ON statement used to catch too
small Initial packets. On QUIC client side, ack-eliciting flag is now
ignored, thus every packets are checked.

This is labelled as MEDIUM as this BUG_ON() is known to be easily
triggered, as QUIC datagrams encoding function are complex. However,
it's important that a QUIC endpoint respects it, else the peer will drop
the invalid packet and could immediately close the connection.
src/quic_tx.c