diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-06-09 16:27:05 +0200 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-06-11 00:52:14 +0200 |
commit | 6cf811e8678b23d03621c94a562181eb73ccc2e0 (patch) | |
tree | 9cef7d768e72d8626592fe00911c1615037e03da /crypto | |
parent | OpenSSL::Test: If __cwd() is to create the directory, do it early (diff) | |
download | openssl-6cf811e8678b23d03621c94a562181eb73ccc2e0.tar.xz openssl-6cf811e8678b23d03621c94a562181eb73ccc2e0.zip |
ossl_provider_set_module_path: Prevent potential UAF
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15680)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/provider_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/provider_core.c b/crypto/provider_core.c index 30fa44d789..c6a8fa3f26 100644 --- a/crypto/provider_core.c +++ b/crypto/provider_core.c @@ -483,6 +483,7 @@ void ossl_provider_free(OSSL_PROVIDER *prov) int ossl_provider_set_module_path(OSSL_PROVIDER *prov, const char *module_path) { OPENSSL_free(prov->path); + prov->path = NULL; if (module_path == NULL) return 1; if ((prov->path = OPENSSL_strdup(module_path)) != NULL) |