diff options
author | Matt Caswell <matt@openssl.org> | 2021-06-17 11:44:10 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2021-06-21 14:54:35 +0100 |
commit | 005505fbf84a93e6f1871c70cfc60bd1f3b86101 (patch) | |
tree | 687d23646c682ef82f2e271152194fe48f99d769 /crypto/rand | |
parent | 11bac1b4c40464850c96225f92a9dc8ac54c35de (diff) |
Ensure we remove libctx DRBG state before removing the provider store
Otherwise a heap use-after-free can result.
Fixes #15766
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15810)
Diffstat (limited to 'crypto/rand')
-rw-r--r-- | crypto/rand/rand_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/rand/rand_lib.c b/crypto/rand/rand_lib.c index 62bd1d6796..8f76c8a5f0 100644 --- a/crypto/rand/rand_lib.c +++ b/crypto/rand/rand_lib.c @@ -492,7 +492,7 @@ static void rand_ossl_ctx_free(void *vdgbl) } static const OSSL_LIB_CTX_METHOD rand_drbg_ossl_ctx_method = { - OSSL_LIB_CTX_METHOD_DEFAULT_PRIORITY, + OSSL_LIB_CTX_METHOD_PRIORITY_2, rand_ossl_ctx_new, rand_ossl_ctx_free, }; |