diff options
author | Matt Caswell <matt@openssl.org> | 2021-05-14 15:33:40 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2021-05-17 10:36:03 +0100 |
commit | a227ff336fc934b4a52c4659ae423dfa10efd5f3 (patch) | |
tree | 573468fdd777c35a2aabb58591dcc3dd731a6f73 /crypto | |
parent | 55373bfd419ca010a15aac18c88c94827e2f3a92 (diff) | |
download | openssl-new-a227ff336fc934b4a52c4659ae423dfa10efd5f3.tar.gz |
Fix a use-after-free in the child provider code
If the child provider context data gets cleaned up before all usage of
providers has finished then a use-after-free can occur. We change the
priority of this data so that it gets freed later.
Fixes #15284
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15286)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/provider_child.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/provider_child.c b/crypto/provider_child.c index 2487d43fd7..14d0054624 100644 --- a/crypto/provider_child.c +++ b/crypto/provider_child.c @@ -47,7 +47,7 @@ static void child_prov_ossl_ctx_free(void *vgbl) } static const OSSL_LIB_CTX_METHOD child_prov_ossl_ctx_method = { - OSSL_LIB_CTX_METHOD_DEFAULT_PRIORITY, + OSSL_LIB_CTX_METHOD_LOW_PRIORITY, child_prov_ossl_ctx_new, child_prov_ossl_ctx_free, }; |