openssl/crypto/dsa
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
..
build.info
dsa_ameth.c Copyright year updates 2024-09-05 09:35:49 +02:00
dsa_asn1.c
dsa_backend.c
dsa_check.c
dsa_depr.c
dsa_err.c
dsa_gen.c
dsa_key.c
dsa_lib.c Fix potential use-after-free in REF_PRINT_COUNT 2024-12-10 14:58:08 +01:00
dsa_local.h
dsa_meth.c
dsa_ossl.c Copyright year updates 2024-09-05 09:35:49 +02:00
dsa_pmeth.c Copyright year updates 2024-09-05 09:35:49 +02:00
dsa_prn.c
dsa_sign.c Copyright year updates 2024-09-05 09:35:49 +02:00
dsa_vrf.c