Package: softhsm2 / 2.6.1-2
Patch seriesview the series file
|0001 Issue 548 Don t clean up engines after OpenSSL has a.patch | (download)||
64 46 + 18 - 0 !
issue #548: don't clean up engines after openssl has already shut down MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit As of 1.1.0, OpenSSL registers its own atexit() handler to call OPENSSL_cleanup(). If our own code subsequently tries to, for example, unreference an ENGINE, then it'll crash or deadlock with a use after free. Fix it by registering a callback with OPENSSL_atexit() to be called when OPENSSL_cleanup() is called. It sets a flag which prevents any further touching of OpenSSL objects — which would otherwise happen fairly much immediately thereafter when our own OSSLCryptoFactory destructor gets called by the C++ runtime's own atexit() handler. Fixes: #548
|0002 Fix OPENSSL_cleanup detection without using our own .patch | (download)||
40 15 + 25 - 0 !
fix openssl_cleanup() detection without using our own atexit() handler We can't register our own atexit() or OPENSSL_atexit() handler because there's no way to unregister it when the SoftHSM DSO is unloaded. This causes the crash reported at https://bugzilla.redhat.com/1831086#c8 Instead of using that method to set a flag showing that OPENSSL_cleanup() has occurred, instead test directly by calling OPENSSL_init_crypto() for something that *would* do nothing, but will fail if OPENSSL_cleanup() has indeed been run already. Fixes: c2cc0652b4 "Issue #548: Don't clean up engines after OpenSSL has already shut down"