openssl/ssl
Todd Short 4842a27b90 Free up space in the session cache before adding.
Fixes #18690

In some circumstances, it's possible that when using an external
database for the session cache, that pulling in an entry from that
cache to the internal cache will cause the newly added entry to
be deleted from the internal cache. This is likely to happen when
the internal cache is set to have a small size, and the newly added
entry's timeout places it at the end of the cache list.

This could be fixed by updating the timestamp of the session (via
`SSL_SESSION_set_time()` or `SSL_SESSION_set_timeout()`) before
adding to the cache. But that may not be desireable.

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18905)
2022-08-01 13:15:51 +02:00
..
quic QUIC Frame Encoding and Decoding Functions 2022-07-29 16:28:37 +10:00
record Check that IV length is not less than zero 2022-08-01 08:14:23 +01:00
statem Check that IV length is not less than zero 2022-08-01 08:14:23 +01:00
bio_ssl.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
build.info ssl: implement an event queue 2022-07-06 10:33:11 +10:00
d1_lib.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
d1_msg.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
d1_srtp.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
event_queue.c ssl: implement an event queue 2022-07-06 10:33:11 +10:00
ktls.c Check that IV length is not less than zero 2022-08-01 08:14:23 +01:00
methods.c
pqueue.c
priority_queue.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
s3_cbc.c fips module header inclusion fine-tunning 2021-07-06 10:52:27 +10:00
s3_enc.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
s3_lib.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
s3_msg.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
ssl_asn1.c Make the -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION pass tests 2021-08-31 12:20:12 +02:00
ssl_cert_table.h
ssl_cert.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
ssl_ciph.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
ssl_conf.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
ssl_err_legacy.c Update copyright year 2021-06-17 13:24:59 +01:00
ssl_err.c Update copyright year 2022-05-03 13:34:51 +01:00
ssl_init.c err: get rid of err_free_strings_int() 2022-05-10 09:47:54 +02:00
ssl_lib.c Fix SSL_pending() and SSL_has_pending() with DTLS 2022-08-01 08:07:45 +01:00
ssl_local.h SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
ssl_mcnf.c
ssl_rsa_legacy.c
ssl_rsa.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
ssl_sess.c Free up space in the session cache before adding. 2022-08-01 13:15:51 +02:00
ssl_stat.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
ssl_txt.c Update copyright year 2022-05-03 13:34:51 +01:00
ssl_utst.c
sslerr.h
t1_enc.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
t1_lib.c Check that IV length is not less than zero 2022-08-01 08:14:23 +01:00
t1_trce.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
time.c ssl: expose the get time function internally 2022-06-22 13:05:40 +10:00
tls13_enc.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
tls_depr.c SSL object refactoring using SSL_CONNECTION object 2022-07-28 10:04:28 +01:00
tls_srp.c Coverity 1507484: dereference before null check 2022-08-01 08:18:36 +01:00