]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: quic: leak of the NEW_TOKEN frame on token generation failure
authorFrederic Lecaille <flecaille@haproxy.com>
Thu, 3 Sep 2026 08:16:59 +0000 (10:16 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Thu, 3 Sep 2026 17:44:36 +0000 (19:44 +0200)
commit055f5a7f49eccec1987fd37c4bb813357d14f194
treec91070e8fe6bcad54c43a2396e71fec79a4ab92a
parent6687743ffe4f75347a9555d059f85d9704042d97
BUG/MINOR: quic: leak of the NEW_TOKEN frame on token generation failure

In quic_build_post_handshake_frames(), the NEW_TOKEN frame is appended to the
local frame list only after its token is generated. The error path taken when
quic_generate_token() fails frees that list, and therefore never sees the frame.
This only happens on a memory allocation failure, when the AEAD context used to
cipher the token cannot be created.

Append the frame as soon as it is allocated, as done just above for the
HANDSHAKE_DONE frame.

This bug was introduced by commit f627b9272 ("BUG/MEDIUM: quic: always validate
sender address on 0-RTT").

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