BUG/MINOR: quic: Wrong Application encryption level selection when probing
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 13 Apr 2023 16:30:16 +0000 (18:30 +0200)
committerFrédéric Lécaille <flecaille@haproxy.com>
Thu, 13 Apr 2023 17:20:09 +0000 (19:20 +0200)
commit895700bd325b1ceedba35bae4104633059ccd967
tree25c24bc8ce270387bd72ba0d0ff3a2df8d414864
parenta576c1b0c60fc81f3a03de411661c0ee37845f43
BUG/MINOR: quic: Wrong Application encryption level selection when probing

This bug arrived with this commit:

    MEDIUM: quic: Ack delay implementation

After having probed the Handshake packet number space, one must not select the
Application encryption level to continue trying building packets as this is done
when the connection is not probing. Indeed, if the ACK timer has been triggered
in the meantime, the packet builder will try to build a packet at the Application
encryption level to acknowledge the received packet. But there is very often
no 01RTT packet to acknowledge when the connection is probing before the
handshake is completed. This triggers a BUG_ON() in qc_do_build_pkt() which
checks that the tree of ACK ranges to be used is not empty.

Thank you to @Tristan971 for having reported this issue in GH #2109.

Must be backported to 2.6 and 2.7.
src/quic_conn.c