BUG/MEDIUM: quic: Avoid trying to send ACK frames from an empty ack ranges tree
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 7 Nov 2023 17:27:50 +0000 (18:27 +0100)
committerFrédéric Lécaille <flecaille@haproxy.com>
Thu, 9 Nov 2023 09:32:31 +0000 (10:32 +0100)
commitc78cb49a3b432cabe54804b462a6a83e6dda1cfd
treea4d77c6e3f40cbebc1c79e7aaa4cc4d5fcdca7ba
parent4e3b28e8b6b0859596532b4541183d96f4c8ad6a
BUG/MEDIUM: quic: Avoid trying to send ACK frames from an empty ack ranges tree

This may happen upon ack ranges allocation failures (from quic_update_ack_ranges_list().
This can lead to empty trees of ack ranges to be used to build ACK frames which
is not good at all. Furthermore this is detected by a BUG_ON() (in qc_do_build_pkt()).

To avoid this, simply update the acknowledgemen state of the connection only if
quic_update_ack_ranges_list() succeeds, as it fails only in case of memory
allocation failures.

Must be backported as far as 2.6.
src/quic_rx.c