]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-quic: do not crash on qcs_destroy for connection error
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 23 Feb 2024 10:41:33 +0000 (11:41 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 23 Feb 2024 10:41:33 +0000 (11:41 +0100)
commit73806f067501fef714070b881f2e3d6bc9ec1021
tree38c31271978548e47641e76e6fc5d5313ca64296
parent1b8c5abeeb2ab8428be3aa53ff42709d60b83bd7
BUG/MEDIUM: mux-quic: do not crash on qcs_destroy for connection error

On qcs_destroy(), a BUG_ON() statement check that QCS does not have
anymore prepared data. This is to ensure connection flow control is
always coherent and prevent transfer freeze.

However, this BUG_ON() may cause a spurrious crash in case QCC is
considered on error. Indeed, in this case, all transfers are interrupted
and qmux_strm_detach() will proceed to immediate QCS free before
releasing the connection. In this situation, connection flow control is
irrelevant so the BUG_ON() should be ignored.

This crash occurs since the MUX refactoring via the following patch.
Previously, a similar BUG_ON() was used but it was incorrectly
implemented rendering it immune even to targetted cause.

  3fe3251593e32c7ee07be94a193aea3a8eefb076
  MEDIUM: mux-quic: simplify sending API

This should fix github issue #2456.

This does not need to be backported.
src/mux_quic.c