summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_sess.c
diff options
context:
space:
mode:
authorRobert Schulze <robert@clickhouse.com>2024-06-18 22:31:14 +0200
committerNeil Horman <nhorman@openssl.org>2024-06-21 13:57:56 +0200
commit8d934a75929d058bbc4566a6ebc9f804e1dd081f (patch)
treef761826eac0c1341da0aa5292925f556b24ea6c1 /ssl/ssl_sess.c
parentFix data race between SSL_SESSION_list_add and ssl_session_dup (diff)
downloadopenssl-8d934a75929d058bbc4566a6ebc9f804e1dd081f.tar.xz
openssl-8d934a75929d058bbc4566a6ebc9f804e1dd081f.zip
Incorporate review feedback
Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/24673)
Diffstat (limited to 'ssl/ssl_sess.c')
-rw-r--r--ssl/ssl_sess.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c
index 4d3bbe8403..6b5d9bbb24 100644
--- a/ssl/ssl_sess.c
+++ b/ssl/ssl_sess.c
@@ -141,13 +141,10 @@ static SSL_SESSION *ssl_session_dup_intern(const SSL_SESSION *src, int ticket)
return NULL;
/*
- * Copy until prev ptr, because it's a part of sessons cache which can be modified
- * concurrently. Other fields filled in the code bellow.
+ * src is logically read-only but the prev/next pointers are not, they are
+ * part of the session cache and can be modified concurrently.
*/
memcpy(dest, src, offsetof(SSL_SESSION, prev));
- dest->ext = src->ext;
- dest->ticket_appdata_len = src->ticket_appdata_len;
- dest->flags = src->flags;
/*
* Set the various pointers to NULL so that we can call SSL_SESSION_free in