]> git.ipfire.org Git - thirdparty/openssl.git/commit
Check rand_meth_lock existence before trying to lock it
authorJakub Zelenka <jakub.openssl@gmail.com>
Sat, 22 Mar 2025 11:04:23 +0000 (12:04 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 13 May 2025 09:38:56 +0000 (11:38 +0200)
commit6982df65ca7d4e42997d2ccc229d1401d1036239
tree82b5e3f08f74467f41b14d9e47db9765660d18fe
parent3d6b07f85067962e0d0a9c6329b450f267434204
Check rand_meth_lock existence before trying to lock it

There are situations during exit clean up where dependent libraries
might be using TLS to finalize stuff but that might crash because
the rand_meth_lock can get freed and there is still an attempt to
get rand bytes. This change makes sure that things fail nicely.

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

(cherry picked from commit 4eb3eea7a38eccfa2790020188d1d59dc68d8755)
crypto/rand/rand_lib.c