Sfoglia il codice sorgente

Never set not_resumable on an immutable session.

Once passed to the outside world, an SSL_SESSION is immutable. It is not
thread-safe to set not_resumable. In most cases, the session is already
expired anyway. In other cases, making all this remove session be unlink rather than
destroy is sound and consistent with how we treat sessions elsewhere.

In particular, SSL_CTX_free calls SSL_CTX_flush_sessions(0), and
bulk-invalidating everything like this is interfering with some
follow-up changes to improve the fuzzer.

Change-Id: I2a19b8ce32d9effc1efaa72e934e015ebbbfbf9a
Reviewed-on: https://boringssl-review.googlesource.com/17530
Reviewed-by: David Benjamin <davidben@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 7 anni fa
parent
commit
a6bae93bf8
1 ha cambiato i file con 0 aggiunte e 2 eliminazioni
  1. +0
    -2
      ssl/ssl_session.c

+ 0
- 2
ssl/ssl_session.c Vedi File

@@ -959,7 +959,6 @@ static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *session, int lock) {
}

if (ret) {
found_session->not_resumable = 1;
if (ctx->remove_session_cb != NULL) {
ctx->remove_session_cb(ctx, found_session);
}
@@ -1038,7 +1037,6 @@ static void timeout_doall_arg(SSL_SESSION *session, void *void_param) {
* save on locking overhead */
(void) lh_SSL_SESSION_delete(param->cache, session);
SSL_SESSION_list_remove(param->ctx, session);
session->not_resumable = 1;
if (param->ctx->remove_session_cb != NULL) {
param->ctx->remove_session_cb(param->ctx, session);
}


Caricamento…
Annulla
Salva