Prevent use after free of global_engine_lock
authorTomas Mraz <tmraz@fedoraproject.org>
Thu, 21 May 2020 11:16:57 +0000 (13:16 +0200)
committerTomas Mraz <tmraz@fedoraproject.org>
Fri, 22 May 2020 12:50:00 +0000 (14:50 +0200)
commite12813d0d31f4f7be2ccc592d382ef3e94bdb842
tree04d1e956503f2c6427d92add6247185e6496c51b
parent4d55122ee782ebd306ef492f50c9b41e41a56244
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)
crypto/engine/eng_lib.c