]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MAJOR: mux-quic: fix BUG_ON on empty STREAM emission
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 31 Dec 2024 14:21:19 +0000 (15:21 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 31 Dec 2024 15:39:53 +0000 (16:39 +0100)
commit98064537423fafe05b9ddd97e81cedec8b6b278d
tree34863185e6641d518d1faa3403fe6a4dbef4fe37
parent5bbdd14f56a2a672e8fef4449e4143b0f0642812
BUG/MAJOR: mux-quic: fix BUG_ON on empty STREAM emission

A BUG_ON() is present in qcc_io_send() to ensure that encoded frame list
is empty if qcc_build_frms() previously returned 0.

This BUG_ON() may be triggered if empty STREAM frame is encoded for
standalone FIN. Indeed, qcc_build_frms() returns the sum of all STREAM
payload length. In case only empty STREAM frames are generated, return
value will be 0, despite new frames encoded and inserted into frame
list.

To fix this, change return value of qcs_send(). This now returns the
whole STREAM frame length, both header and payload included. This
ensures that qcc_build_frms() won't return a nul value if new frames are
encoded, even empty ones.

This must be backported up to 3.1.
src/mux_quic.c