]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: h3: fix incorrect BUG_ON assert on SETTINGS parsing
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 8 Jun 2022 16:21:32 +0000 (18:21 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 8 Jun 2022 16:26:06 +0000 (18:26 +0200)
commit1cd43aa1947da89044f4c4d699e07cf4fae8d482
treec6c5a85b257ce35b0b8d0b25d51b0cb88ed1fb24
parentaf936762d0548bae80bd9898fb3d4465570aedb5
BUG/MINOR: h3: fix incorrect BUG_ON assert on SETTINGS parsing

BUG_ON() assertion to check for incomplete SETTINGS frame is incorrect.
It should check if frame length is greater, not smaller, than current
buffer data. Anyway, this BUG_ON() is useless as h3_decode_qcs()
prevents parsing of an incomplete frame, except for H3 DATA. Remove it
to fix this bug.

This bug was introduced in the current dev tree by commit
  commit 62eef85961f4a2a241e0b24ef540cc91f156b842
  MINOR: mux-quic: simplify decode_qcs API
Thus it does not need to be backported.

This fixes crashes which happen with DEBUG_STRICT=2. Most notably, this
is reproducible with clients that emit more than just a SETTINGS frame
on the H3 control stream. It can be reproduced with aioquic for example.
src/h3.c