diff options
author | Tomas Mraz <tmraz@fedoraproject.org> | 2020-05-21 13:16:57 +0200 |
---|---|---|
committer | Tomas Mraz <tmraz@fedoraproject.org> | 2020-05-22 14:50:00 +0200 |
commit | e12813d0d31f4f7be2ccc592d382ef3e94bdb842 (patch) | |
tree | 04d1e956503f2c6427d92add6247185e6496c51b /crypto/engine | |
parent | 4d55122ee782ebd306ef492f50c9b41e41a56244 (diff) |
Prevent use after free of global_engine_lock
If buggy application calls engine functions after cleanup of engines
already happened the global_engine_lock will be used although
already freed.
See for example:
https://bugzilla.redhat.com/show_bug.cgi?id=1831086
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/11896)
Diffstat (limited to 'crypto/engine')
-rw-r--r-- | crypto/engine/eng_lib.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/engine/eng_lib.c b/crypto/engine/eng_lib.c index 4ba235ca75..0cdb3fde42 100644 --- a/crypto/engine/eng_lib.c +++ b/crypto/engine/eng_lib.c @@ -171,6 +171,7 @@ void engine_cleanup_int(void) cleanup_stack = NULL; } CRYPTO_THREAD_lock_free(global_engine_lock); + global_engine_lock = NULL; } /* Now the "ex_data" support */ |