BUG/MEDIUM: h3: Properly limit the number of headers received
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 20 Nov 2024 16:20:05 +0000 (17:20 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 20 Nov 2024 16:44:22 +0000 (17:44 +0100)
commit785e63335374a6db8ef35205cdb36ea726710061
tree4fbd1a0c8f38e0809393390230c47e5d08a77b07
parent63d2760dfa679bea4b7a61a1a8702af23cf26e75
BUG/MEDIUM: h3: Properly limit the number of headers received

The number of headers are limited before the decoding but pseudo headers and
cookie headers consume extra slots. In practice, this lowers the maximum number
of headers that can be received.

To workaround this issue, the limit is doubled during the frame decoding to be
sure to have enough extra slots. And the number of headers is tested against the
configured limit after the HTX message was created to be able to report an
error. Unfortunatly no parsing error are reported because the QUIC multiplexer
is not able to do so for now.

The same is performed on trailers to be consistent with H2.

This patch should be backported as far as 2.6.
src/h3.c