23a8ca1f10
It doesn't appear that logic (added in upstream's b7cfcfb7f8e17c17f457b3384010eb027f3aad72) is protecting against anything. On the contrary, it prohibits implementing CRYPTO_add with real atomic operations! There's no guarantee that those operations will interact with the locked implementation. https://www.mail-archive.com/openssl-users@openssl.org/msg63176.html As long as ssl->session points to the same session, we know the session won't be freed. There is no lock protecting, say, SSL_set_session, but a single SSL* does not appear to be safe to use across threads. If this were to be supported, both should be guarded by CRYPTO_LOCK_SSL (which is barely used). CRYPTO_LOCK_SSL_SESSION isn't sufficient anyway; it could sample while SSL_set_session is busy swapping out the now freed old session with the new. Change-Id: I54623d0690c55c2c86720406ceff545e2e5f2f8f Reviewed-on: https://boringssl-review.googlesource.com/3345 Reviewed-by: Adam Langley <agl@google.com> |
||
---|---|---|
.. | ||
pqueue | ||
test | ||
CMakeLists.txt | ||
d1_both.c | ||
d1_clnt.c | ||
d1_lib.c | ||
d1_meth.c | ||
d1_pkt.c | ||
d1_srtp.c | ||
d1_srvr.c | ||
s3_both.c | ||
s3_clnt.c | ||
s3_enc.c | ||
s3_lib.c | ||
s3_meth.c | ||
s3_pkt.c | ||
s3_srvr.c | ||
ssl_algs.c | ||
ssl_asn1.c | ||
ssl_cert.c | ||
ssl_ciph.c | ||
ssl_error.c | ||
ssl_lib.c | ||
ssl_locl.h | ||
ssl_rsa.c | ||
ssl_sess.c | ||
ssl_stat.c | ||
ssl_test.c | ||
ssl_txt.c | ||
t1_enc.c | ||
t1_lib.c | ||
t1_reneg.c |