Ensure we remove libctx DRBG state before removing the provider store
authorMatt Caswell <matt@openssl.org>
Thu, 17 Jun 2021 10:44:10 +0000 (11:44 +0100)
committerMatt Caswell <matt@openssl.org>
Mon, 21 Jun 2021 13:54:35 +0000 (14:54 +0100)
commit005505fbf84a93e6f1871c70cfc60bd1f3b86101
tree687d23646c682ef82f2e271152194fe48f99d769
parent11bac1b4c40464850c96225f92a9dc8ac54c35de
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)
crypto/rand/rand_lib.c