Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CVE-2024-2511 #601

Merged
merged 7 commits into from
May 9, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Hardening around not_resumable sessions
Make sure we can't inadvertently use a not_resumable session

Related to CVE-2024-2511

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from openssl/openssl#24042)
  • Loading branch information
dongbeiouba committed Apr 26, 2024
commit 5b518cd6a156ce233efe8856e3bb4d9c08664c74
6 changes: 6 additions & 0 deletions ssl/ssl_sess.c
Original file line number Diff line number Diff line change
@@ -579,6 +579,12 @@ SSL_SESSION *lookup_sess_in_cache(SSL *s, const unsigned char *sess_id,
#endif

if (ret != NULL) {
if (ret->not_resumable) {
/* If its not resumable then ignore this session */
if (!copy)
SSL_SESSION_free(ret);
return NULL;
}
ssl_tsan_counter(s->session_ctx,
&s->session_ctx->stats.sess_cb_hit);