BUG/MINOR: mux-quic: do not send too big MAX_STREAMS ID
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 8 Aug 2024 10:04:47 +0000 (12:04 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 3 Sep 2024 16:49:07 +0000 (18:49 +0200)
commitcf920ac69b67eef6e714ac7ebc7e9ddc55554e52
tree0e44c33be35988e34ef6a0a82488b394cac0ee27
parent3ce79401b3d208233ec207f18781f6fbb0720f16
BUG/MINOR: mux-quic: do not send too big MAX_STREAMS ID

QUIC stream IDs are expressed as QUIC variable integer which cover the
range for 0 to 2^62 - 1. As such, it is forbidden to send an ID for
MAX_STREAMS flow-control frame which would allow to overcome this value.

This patch fixes MAX_STREAMS emission to ensure sent value is valid.
This also ensures that the peer cannot open a stream with an invalid ID
as this would cause a flow-control violation instead.

This must be backported up to 2.6.

(cherry picked from commit f3c75a52df29247e5d502344127d42efb2c12b82)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
src/mux_quic.c