]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: quic: reject too large CRYPTO frames
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 20 Jan 2025 09:15:12 +0000 (10:15 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 20 Jan 2025 10:43:23 +0000 (11:43 +0100)
commitc3a4a4d1660866457ffb83699bd091621aae680d
tree9c764e7ec9ad8dfac78e71bf1717e4e56bf23e1c
parent0486b9e4918d271ae2ec52d7deb82d415cf7a34c
BUG/MAJOR: quic: reject too large CRYPTO frames

Received CRYPTO frames are inserted in a ncbuf to handle out-of-order
reception via ncb_add(). They are stored on the position relative to the
frame offset, minus a base offset which corresponds to the in-order data
length already handled.

Previouly, no check was implemented on the frame offset value prior to
ncb_add(), which could easily trigger a crash if relative offset was too
large. Fix this by ensuring first that the frame can be stored in the
buffer before ncb_add() invokation. If this is not the case, connection
is closed with error CRYPTO_BUFFER_EXCEEDED, as required by QUIC
specification.

This should fix github issue #2842.

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