BUG/MINOR: h3: prevent hypothetical demux failure on int overflow
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 26 Jan 2023 15:03:45 +0000 (16:03 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 20 Feb 2023 10:15:09 +0000 (11:15 +0100)
commit35d9053b6832c419f9a94ff331b5c495df1cde9d
tree615c88f3e8548dd412a714a4deba0ce2961bbe7c
parent156a89aef8c63910502b266251dc34f648a99fae
BUG/MINOR: h3: prevent hypothetical demux failure on int overflow

h3s stores the current demux frame type and length as a state info. It
should be big enough to store a QUIC variable-length integer which is
the maximum H3 frame type and size.

Without this patch, there is a risk of integer overflow if H3 frame size
is bigger than INT_MAX. This can typically causes demux state mismatch
and demux frame error. However, no occurence has been found yet of this
bug with the current implementation.

This should be backported up to 2.6.
src/h3.c