mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-03-11 08:54:48 +00:00
Security: Prevent loading of openssl.cnf (#13118)
* Security: Prevent loading of openssl.cnf Prevent loading openssl.cnf from the originating vcpkg folder tree to avoid DLL injections. This patch force sets the OPENSSL_CONF and OPENSSL_MODULES env vars to an invalid directory. This prevents openssl from attempting to load a cnf file which can contain settings to load arbitrary DLL files into KeePassXC memory space. Thank you to zdi-disclosures for reporting this finding!
This commit is contained in:
parent
d7dc19bec6
commit
680f5dae7c
1 changed files with 7 additions and 0 deletions
|
|
@ -53,6 +53,13 @@ int main(int argc, char** argv)
|
|||
{
|
||||
QT_REQUIRE_VERSION(argc, argv, QT_VERSION_STR)
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// Set OPENSSL_CONF and OPENSSL_MODULES to an invalid location to prevent DLL injection via openssl.cnf.
|
||||
// vcpkg by default hard-codes this to its packages location, which may be user-writable.
|
||||
qputenv("OPENSSL_CONF", "::");
|
||||
qputenv("OPENSSL_MODULES", "::");
|
||||
#endif
|
||||
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) && defined(Q_OS_WIN)
|
||||
|
|
|
|||
Loading…
Reference in a new issue