]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: quic: fix OOB read in preferred_address transport parameter
authorFrederic Lecaille <flecaille@haproxy.com>
Wed, 4 Mar 2026 16:30:08 +0000 (17:30 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Thu, 5 Mar 2026 14:02:02 +0000 (15:02 +0100)
commitcdcdc016cc19783610d953e04288d2a50689b43d
treeccc4194a767626d94088b3701f051d84079da0ab
parent54b614d2b51930af366ffeff4d48158abc3f8077
BUG/MINOR: quic: fix OOB read in preferred_address transport parameter

This bug impacts only the QUIC backend. A QUIC server does receive
a server preferred address transport parameter.

In quic_transport_param_dec_pref_addr(), the boundary check for the
connection ID was inverted and incorrect. This could lead to an
out-of-bounds read during the following memcpy.

This patch fixes the comparison to ensure the buffer has enough input data
for both the CID and the mandatory Stateless Reset Token.

Thank you to Kamil Frankowicz for having reported this.

Must be backported to 3.3.
src/quic_tp.c