]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Load OpenSSL config on Windows from trusted location
authorLev Stipakov <lev@openvpn.net>
Fri, 19 Nov 2021 01:55:48 +0000 (03:55 +0200)
committerGert Doering <gert@greenie.muc.de>
Wed, 24 Nov 2021 09:46:38 +0000 (10:46 +0100)
commit23e6aaef149bd31a7e80af28ee1e3658d2810d4f
tree38dfa1012e6ac061f7e6c9bb37f9a2ad6464f15b
parentaee54a47142c13a29c2b59142e944fd448a406d9
Load OpenSSL config on Windows from trusted location

Commits

 - 92535b6 ("contrib/vcpkg-ports: add openssl port with
             --no-autoload-config option set (CVE-2121-3606)")
 - 447cfb4 ("crypto_openssl.c: disable explicit initialization on Windows
             (CVE-2121-3606)")

disabled OpenSSL config loading functionality, which could be
exploited by loading config from untrusted locations.

This feature might be useful for some users. This brings it back
and sets OpenSSL enviroment variables

 OPENSSL_CONF, OPENSSL_ENGINES, OPENSSL_MODULES

which are used to load config, engines and modules, to a trusted location.
The location is constructed based on installation path, read from registry
on startup.
If installation path cannot be read, Windows\System32 is used as a
fallback.

While on it, remove unused "bool impersonate_as_system();" declaration.

Trac: #1296

Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Selva Nair <selva.nair@gmail.com>
Message-Id: <20211119015548.687-1-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg23248.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
contrib/vcpkg-triplets/arm64-windows-ovpn.cmake
contrib/vcpkg-triplets/x64-windows-ovpn.cmake
contrib/vcpkg-triplets/x86-windows-ovpn.cmake
src/openvpn/buffer.c
src/openvpn/buffer.h
src/openvpn/crypto_openssl.c
src/openvpn/win32.c
src/openvpn/win32.h