]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: quic: delete the wrong CIDs when post-handshake frames fail
authorFrederic Lecaille <flecaille@haproxy.com>
Wed, 2 Sep 2026 13:06:55 +0000 (15:06 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Wed, 2 Sep 2026 13:34:18 +0000 (15:34 +0200)
commiteefc5312f5c075025073d8fdff9299c5ac346d66
treef9fce8c9aa76a85dbf11c62735bbf20d793bda49
parent4cad64fe4abf4b16c3c608b1e73b7ff17162bd3b
BUG/MINOR: quic: delete the wrong CIDs when post-handshake frames fail

quic_build_post_handshake_frames() registers up to three connection IDs and, on
error, deletes those in [1, max[ where <max> is the loop countdown. This has no
relation to what the call really registered: depending on which iteration
fails, the CIDs are left behind, or an unrelated one is deleted.
->next_cid_seq_num is not restored either, so a later successful retry
issues sequence numbers which are not consecutive with the ones the peer
already knows, which RFC 9000 5.1.1 forbids.

Save the sequence number before the loop, delete exactly the range this call
registered, and give the numbers back.

This should be backported as far as 2.6.
src/quic_conn.c