]> git.ipfire.org Git - thirdparty/openssl.git/commit
Don't reserve an unused cid for NEW_TOKENS
authorNeil Horman <nhorman@openssl.org>
Mon, 27 Jan 2025 21:32:32 +0000 (16:32 -0500)
committerNeil Horman <nhorman@openssl.org>
Mon, 17 Feb 2025 16:27:33 +0000 (11:27 -0500)
commitc266322bd1e2842dd92e7e2fc1043d1ade987c57
treeca7ee278c33e4448517ed39cc5995cf4815d99f2
parentfce82b6ccc6b0461fa2f028fc32e8824dc7da0d1
Don't reserve an unused cid for NEW_TOKENS

Just realized that NEW_TOKEN tokens don't need a reserved rscid.

Because a client might use a received NEW_TOKEN for multiple subsequent
connections, we allocate a cid when we validate the token on new
connection establishment (in fact we just use the one that the client
sends).  As such the allocated rscid never gets used, and just sits
there until it ages out.

Instead, fill the rscid with random data to mutate subsequently
generated NEW_TOKENS's, since it won't ever be part of the validation
process anyway.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26517)
ssl/quic/quic_port.c