]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: quic: reject packet too short for HP decryption
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 26 May 2026 15:21:07 +0000 (17:21 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 26 May 2026 15:21:07 +0000 (17:21 +0200)
commitce9371a768a6df6591bd8cc4c44c61f5a3049925
treec6349e6625f9d29f29d6df27ea292db2866a2be1
parent2c0e633f6b00ef4cde0e0bc1a10d72fd4f9b6e65
BUG/MINOR: quic: reject packet too short for HP decryption

Header protection can only be performed on a packet of a minimal size.
There was already a check for this in qc_do_rm_hp() but it did not use
the correct value.

Fix this by using the correct minimal size which is 20 bytes starting
from the packet number offset. This is enough to decrypt 4 bytes (PN max
size) and 16 bytes of IV. If the packet is not big enough, it is
still silently discarded.

This must be backported up to 2.6.
src/quic_rx.c