aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorshin4141 <[email protected]>2026-09-06 00:07:20 +0200
committerNorbert Pocs <[email protected]>2026-09-16 16:13:10 +0200
commitaeeca5a9e07166183fe323f336c9177a9b524c78 (patch)
tree655264d3258d34afff6eadcb3f692c96ad066557 /include
parentRemoves unused args from ossl_rsa_multiprime_derive() declaration (diff)
downloadopenssl-aeeca5a9e07166183fe323f336c9177a9b524c78.tar.gz
openssl-aeeca5a9e07166183fe323f336c9177a9b524c78.zip
rand: prevent recursive seed source construction
Strict on-demand seed source construction can re-enter itself when the configured RAND requests entropy or a nonce through provider upcalls. This recursively constructs the same seed source until the process exhausts its stack. Track active construction by logical execution so true recursion fails with a RAND error while independent ASYNC jobs on the same thread and library context can proceed. Keep the guard active during provider lookup, context creation, and instantiation. Add regression coverage for clean strict failure, independent and paused ASYNC jobs, non-strict error propagation, and no-err builds. Fixes #32683 Assisted-by: Codex:gpt-5 Reviewed-by: Mounir Idrassi <[email protected]> Reviewed-by: Tomas Mraz <[email protected]> Merge-date: Wed Sep 16 14:15:40 2026 Merged-from: https://github.com/openssl/openssl/pull/32685
Diffstat (limited to 'include')
-rw-r--r--include/internal/threads_common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/internal/threads_common.h b/include/internal/threads_common.h
index c1da68a5dbd..a9cfa4c6acd 100644
--- a/include/internal/threads_common.h
+++ b/include/internal/threads_common.h
@@ -40,6 +40,7 @@ typedef enum {
CRYPTO_THREAD_LOCAL_TEVENT_KEY,
CRYPTO_THREAD_LOCAL_TANDEM_ID_KEY,
CRYPTO_THREAD_LOCAL_FIPS_DEFERRED_KEY,
+ CRYPTO_THREAD_LOCAL_RAND_SEED_KEY,
CRYPTO_THREAD_LOCAL_KEY_MAX
} CRYPTO_THREAD_LOCAL_KEY_ID;