openssl/crypto/evp
Neil Horman dc10ffc283 Fix potential use-after-free in REF_PRINT_COUNT
We use REF_PRINT_COUNT to dump out the value of various reference
counters in our code

However, we commonly use this macro after an increment or decrement.  On
increment its fine, but on decrement its not, because the macro
dereferences the object holding the counter value, which may be freed by
another thread, as we've given up our ref count to it prior to using the
macro.

The rule is that we can't reference memory for an object once we've
released our reference, so lets fix this by altering REF_PRINT_COUNT to
accept the value returned by CRYPTO_[UP|DOWN]_REF instead.  The
eliminates the need to dereference the memory the object points to an
allows us to use the call after we release our reference count

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25664)
2024-12-10 14:58:08 +01:00
..
asymcipher.c
bio_b64.c Copyright year updates 2024-09-05 09:35:49 +02:00
bio_enc.c Copyright year updates 2024-04-09 13:43:26 +02:00
bio_md.c
bio_ok.c Copyright year updates 2024-09-05 09:35:49 +02:00
build.info Exclude EVP_DigestSign and EVP_DigestVerify related APIs from the FIPS 2024-10-04 17:41:13 +02:00
c_allc.c
c_alld.c
cmeth_lib.c
ctrl_params_translate.c Bugfixes for params to legacy control translations for EC parameters 2024-11-07 10:35:54 +01:00
dh_ctrl.c
dh_support.c Copyright year updates 2024-09-05 09:35:49 +02:00
digest.c Add CTX copy function for EVP_MD to optimize the performance of EVP_MD_CTX_copy_ex. 2024-11-20 14:12:53 +01:00
dsa_ctrl.c
e_aes_cbc_hmac_sha1.c
e_aes_cbc_hmac_sha256.c
e_aes.c Copyright year updates 2024-04-09 13:43:26 +02:00
e_aria.c
e_bf.c
e_camellia.c
e_cast.c
e_chacha20_poly1305.c
e_des3.c Copyright year updates 2024-09-05 09:35:49 +02:00
e_des.c
e_idea.c
e_null.c
e_old.c
e_rc2.c
e_rc4_hmac_md5.c
e_rc4.c
e_rc5.c
e_seed.c
e_sm4.c
e_xcbc_d.c
ec_ctrl.c
ec_support.c
encode.c Copyright year updates 2024-09-05 09:35:49 +02:00
evp_cnf.c
evp_enc.c Copyright year updates 2024-09-05 09:35:49 +02:00
evp_err.c fix coding style 2024-08-27 13:56:28 +02:00
evp_fetch.c EVP_get_default_properties - implementation 2024-09-16 08:15:52 +10:00
evp_key.c Copyright year updates 2024-04-09 13:43:26 +02:00
evp_lib.c Don't restrict what EVP_PKEY_Q_keygen can be used for 2024-09-17 16:25:44 +01:00
evp_local.h Implement functionality for direct use of composite signature algorithms 2024-08-21 08:21:06 +02:00
evp_pbe.c
evp_pkey.c
evp_rand.c
evp_utils.c
exchange.c
kdf_lib.c
kdf_meth.c
kem.c
keymgmt_lib.c Copyright year updates 2024-04-09 13:43:26 +02:00
keymgmt_meth.c Add KeyManagement keygen parameter getter/gettable functions. 2024-08-06 11:01:13 +02:00
legacy_blake2.c
legacy_md2.c
legacy_md4.c
legacy_md5_sha1.c
legacy_md5.c
legacy_mdc2.c
legacy_meth.h
legacy_ripemd.c
legacy_sha.c
legacy_wp.c
m_null.c
m_sigver.c Exclude EVP_DigestSign and EVP_DigestVerify related APIs from the FIPS 2024-10-04 17:41:13 +02:00
mac_lib.c
mac_meth.c
names.c Copyright year updates 2024-09-05 09:35:49 +02:00
p5_crpt2.c
p5_crpt.c Copyright year updates 2024-09-05 09:35:49 +02:00
p_dec.c
p_enc.c
p_legacy.c
p_lib.c Fix potential use-after-free in REF_PRINT_COUNT 2024-12-10 14:58:08 +01:00
p_open.c
p_seal.c
p_sign.c
p_verify.c
pbe_scrypt.c
pmeth_check.c
pmeth_gn.c
pmeth_lib.c Add KeyManagement keygen parameter getter/gettable functions. 2024-08-06 11:01:13 +02:00
signature.c Refactor OpenSSL 'EdDSA' EVP_SIGNATURE to allow use with EVP_PKEY functions 2024-08-29 19:13:06 +02:00