]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: mux-quic: properly trim HTX buffer on snd_buf reset
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 20 Sep 2022 12:46:40 +0000 (14:46 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 20 Sep 2022 13:35:33 +0000 (15:35 +0200)
commit0ed617ac2ff377ce60bd9c8fd97fd9da32d43971
tree70f93c2612e7a76d86014960e5e1ffc6b8b48cb7
parent9534e59bb9057cfa5762f9c119579a67f705de37
BUG/MEDIUM: mux-quic: properly trim HTX buffer on snd_buf reset

MUX QUIC snd_buf operation whill return early if a qcs instance is
resetted. In this case, HTX is left untouched and the callback returns
the whole bufer size. This lead to an undefined behavior as the stream
layer is notified about a transfer but does not see its HTX buffer
emptied. In the end, the transfer may stall which will lead to a leak on
session.

To fix this, HTX buffer is now resetted when snd_buf is short-circuited.
This should fix the issue as now the stream layer can continue the
transfer until its completion.

This patch has already been tested by Tristan and is reported to solve
the github issue #1801.

This should be backported up to 2.6.
include/haproxy/qmux_http.h
src/mux_quic.c
src/qmux_http.c