CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2026/08/30 06:19:37
Modified files:
lib/libcrypto : crypto.h crypto_ex_data.c crypto_init.c
crypto_internal.h
lib/libcrypto/man: CRYPTO_set_ex_data.3 OPENSSL_init_crypto.3
regress/lib/libcrypto/dsa: dsatest.c
regress/lib/libcrypto/ec: ectest.c
regress/lib/libcrypto/ecdsa: ecdsatest.c
regress/lib/libcrypto/evp: evptest.c
regress/lib/libcrypto/exdata: exdata_test.c
regress/lib/libcrypto/pbkdf2: pbkdf2.c
regress/lib/libssl/ssl: ssltest.c
usr.bin/openssl: openssl.c
Log message:
Make CRYPTO_cleanup_all_ex_data() a compatibility no-op
The ex_data callback registry is process-wide, but this API could free
it while other threads were still using libcrypto, resulting in a
use-after-free.
Retain the public symbol as a compatibility no-op and mark it
deprecated. Move the actual cleanup to an internal function called by
OPENSSL_cleanup(). Replace the in-tree callers with OPENSSL_cleanup()
at final shutdown to preserve cleanup behavior and coverage.
Document both APIs and the requirement that OPENSSL_cleanup() only be
called after all threads and components have stopped using libcrypto.
ok tb