Matt Caswell 7984fa683e Fix unconstrained session cache growth in TLSv1.3
In TLSv1.3 we create a new session object for each ticket that we send.
We do this by duplicating the original session. If SSL_OP_NO_TICKET is in
use then the new session will be added to the session cache. However, if
early data is not in use (and therefore anti-replay protection is being
used), then multiple threads could be resuming from the same session
simultaneously. If this happens and a problem occurs on one of the threads,
then the original session object could be marked as not_resumable. When we
duplicate the session object this not_resumable status gets copied into the
new session object. The new session object is then added to the session
cache even though it is not_resumable.

Subsequently, another bug means that the session_id_length is set to 0 for
sessions that are marked as not_resumable - even though that session is
still in the cache. Once this happens the session can never be removed from
the cache. When that object gets to be the session cache tail object the
cache never shrinks again and grows indefinitely.

CVE-2024-2511

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24042)
2024-04-08 12:06:25 +02:00
..
2024-04-04 18:16:05 +02:00
2024-02-10 11:37:14 +00:00
2023-09-07 09:59:15 +01:00
2022-11-14 10:14:41 +01:00
2023-03-28 13:49:54 -04:00
2023-09-07 09:59:15 +01:00
2023-11-27 07:51:33 +00:00
2023-11-27 07:51:33 +00:00
2021-06-17 13:24:59 +01:00
2024-02-10 11:37:14 +00:00
2023-09-28 14:23:29 +01:00
2020-11-18 23:38:34 +01:00
2023-09-07 09:59:15 +01:00
2024-01-23 14:20:06 +00:00
2024-04-02 05:37:00 -04:00