]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix a deadlock while attempting to get the Primary EVP_RAND_CTX
authorMatt Caswell <matt@openssl.org>
Tue, 15 Apr 2025 14:03:36 +0000 (15:03 +0100)
committerTomas Mraz <tomas@openssl.org>
Wed, 30 Apr 2025 08:56:17 +0000 (10:56 +0200)
commitab5a3bf1a23b252ed1ef06ed93b484615c379539
treea73765cae6df3764c31b16bf373e4a531ec63e25
parentaa824cb9e82b21f36804d630084886baa733832d
Fix a deadlock while attempting to get the Primary EVP_RAND_CTX

When only the FIPS provider was loaded we could get a deadlock when
calling RAND_get0_primary() due to attempting to obtain a recursive
lock.

We reduce the scope of the locks that we hold to avoid this.

Fixes #27391

Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27408)

(cherry picked from commit 01ea08049815325bf7719499f58c3799aa3fb555)
crypto/rand/rand_lib.c