BUG/MINOR: Crash on O-RTT RX packet after dropping Initial pktns
authorFrederic Lecaille <flecaille@haproxy.com>
Tue, 3 Sep 2024 13:10:25 +0000 (15:10 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 3 Sep 2024 13:29:32 +0000 (15:29 +0200)
commit2f7ae07342a881b4e354aadfd666a916fbfa1f66
tree1f7f482d76baf562b28711625add16887b83866f
parent19d9009a9167789092c9f38fdd36c0f6a7c67041
BUG/MINOR: Crash on O-RTT RX packet after dropping Initial pktns

This bug arrived with this naive commit:

    BUG/MINOR: quic: Too shord datagram during O-RTT handshakes (aws-lc only)

which omitted to consider the case where the Initial packet number space
could be discarded before receiving 0-RTT packets.

To fix this, append/insert the O-RTT (early-data) packet number space
into the encryption level list depending on the presence or not of
the Initial packet number space.

This issue was revealed when using aws-lc as TLS stack in GH #2701 issue.
Thank you to @Tristan971 for having reported this issue.

Must be backported where the commit mentionned above is supposed to be
backported: as far as 2.9.

(cherry picked from commit 7e19432fd41e9c0146f0227b43d0dd3dc740e20b)
Signed-off-by: Willy Tarreau <w@1wt.eu>
src/quic_tls.c