]> 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:55:44 +0000 (10:55 +0200)
commit01ea08049815325bf7719499f58c3799aa3fb555
treecc1f40db98d43be38c229d45200ce5a54b9b7e56
parent6ff4c1d87468fdd18deeebbb01fbf049bd6cec1f
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)
crypto/rand/rand_lib.c