1
0
Fork 0
mirror of https://github.com/OpenVPN/openvpn.git synced 2026-11-24 13:52:13 +01:00
OpenVPN is an open source VPN daemon
  • C 94.3%
  • Shell 2%
  • M4 1.5%
  • CMake 1.1%
  • Makefile 0.8%
  • Other 0.3%
Find a file
Heiko Hund 7b9bbb2254 win32: restrict the DLL search path of openvpn
DLLs that openvpn loads by name, like dependencies of plugins or
modules loaded by libraries like OpenSSL, are searched in the current
directory and the directories in PATH, among others. These can contain
places where users have write access. Placing a dll there makes it
possible to inject code into the openvpn process and gives access to
privileged operations.

Call SetDefaultDllDirectories() at the start of wmain() to restrict the
search to the application directory, the system directory and the
directories added with AddDllDirectory(). openvpn exits if this fails.

The trusted plugin directory is added with AddDllDirectory(). To get
it, move the code that determined it inline in plugin_in_trusted_dir()
into get_plugin_dir(), which returns the normalized directory or fails
if it cannot be determined.

plugin_in_trusted_dir() now only checks against the system directory
if the plugin is not in the plugin directory. It now fails if the
system directory cannot be retrieved, instead of checking against an
empty path.

Change-Id: I9093aaaf8f198cd389e9f72186397a87a7ded297
Signed-off-by: Heiko Hund <heiko@ist.eigentlich.net>
Acked-by: Lev Stipakov <lstipakov@gmail.com>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn-private/+/2147
Message-Id: <20261123172414.22019-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg41842.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
2026-11-24 13:16:15 +01:00
.github GHA: Use latest NDK 2026-11-16 16:01:44 +01:00
contrib contrib: drop fwmarkroute scripts 2026-11-20 11:50:33 +01:00
debug
dev-tools gerrit-send-mail: Support user authentication 2026-11-23 18:23:02 +01:00
distro dns-scripts: Fix dnssec values in comments and Copyright statement format 2026-04-30 15:19:34 +02:00
doc multi: raise the open files limit for --max-clients 2026-11-22 12:25:58 +01:00
include win: Fix nrpt_dnssec flag handling 2026-04-05 16:28:20 +02:00
m4 configure: Add --enable-code-coverage 2026-10-16 17:06:22 +02:00
sample Remove orphaned ring_buffer.h and ffdhe2048.pem 2026-11-21 18:51:51 +01:00
src win32: restrict the DLL search path of openvpn 2026-11-24 13:16:15 +01:00
tests networking: use NET_ROUTE_TABLE_DEFAULT (-1) for 'no route table' 2026-11-20 11:40:46 +01:00
.clang-format clang-format: Enable InsertNewlineAtEOF 2026-10-15 16:54:59 +02:00
.git-blame-ignore-revs Add clang-format reformat commit to .git-blame-ignore-revs 2025-08-05 17:07:05 +02:00
.gitattributes
.gitignore configure: Add --enable-code-coverage 2026-10-16 17:06:22 +02:00
.mailmap
.pre-commit-config.yaml Update the clang-format reference version to 21.1.8 2026-02-10 16:29:04 +01:00
AUTHORS
ChangeLog start release/2.8 development cycle 2026-02-13 13:11:33 +01:00
Changes.md win32: restrict the DLL search path of openvpn 2026-11-24 13:16:15 +01:00
CMakeLists.txt control_msg: Add a shared TLV codec and use it for early negotiation 2026-11-18 15:47:05 +01:00
CMakePresets.json
CODE_CHECKLIST.md Start a new document CODE_CHECKLIST 2026-08-17 18:57:11 +02:00
compat.m4 Update GPL header in all source files to current recommended version 2025-08-03 16:55:47 +02:00
config.h.cmake.in Remove replay-persist 2026-11-12 17:21:31 +01:00
configure.ac Enable -Wsign-conversion 2026-11-13 23:02:28 +01:00
CONTRIBUTING.rst CONTRIBUTING: Update outdated/obsolete information 2025-10-13 18:10:25 +02:00
COPYING Update Copyright statements to 2026 2026-01-08 10:59:57 +01:00
COPYRIGHT.GPL Update text of GPL to latest version from FSF 2025-08-03 16:43:58 +02:00
forked-test-driver
INSTALL tun: drop no-op IFF_ONE_QUEUE on Linux 2026-11-16 09:58:46 +01:00
lcovrc configure: Add --enable-code-coverage 2026-10-16 17:06:22 +02:00
ltrc.inc
Makefile.am configure: Add --enable-code-coverage 2026-10-16 17:06:22 +02:00
NEWS
PORTS Update Copyright statements to 2026 2026-01-08 10:59:57 +01:00
README Fix copyright line in README 2026-04-21 08:17:48 +02:00
README.awslc
README.cmake.md
README.dco.md
README.ec
README.mbedtls Remove Mbed TLS 3 compatibility 2026-10-31 13:42:16 +01:00
README.wolfssl Add a section about wolfSSL GPLv3 and point out missing TLS PRF support 2025-12-04 14:59:08 +01:00
renovate.json renovate: Fix typo in regex manager 2026-06-10 19:08:52 +02:00
version.m4 start release/2.8 development cycle 2026-02-13 13:11:33 +01:00

OpenVPN -- A Secure tunneling daemon

Copyright (C) 2002-2026 OpenVPN Inc. This program is free software;
you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.

*************************************************************************

To get the latest release of OpenVPN, go to:

	https://openvpn.net/community-downloads/

To Build and Install,

	tar -zxf openvpn-<version>.tar.gz
	cd openvpn-<version>
	./configure
	make
	make install

or see the file INSTALL for more info.

For information on how to build OpenVPN on/for Windows with MinGW
or MSVC see README.cmake.md.

*************************************************************************

For detailed information on OpenVPN, including examples, see the man page
  http://openvpn.net/man.html

For a sample VPN configuration, see
  http://openvpn.net/howto.html

To report an issue, see
  https://github.com/OpenVPN/openvpn/issues/new

For a description of OpenVPN's underlying protocol,
  see the file ssl.h included in the source distribution.

*************************************************************************

Other Files & Directories:

* configure.ac -- script to rebuild our configure
  script and makefile.

* sample/sample-scripts/verify-cn

  A sample perl script which can be used with OpenVPN's
  --tls-verify option to provide a customized authentication
  test on embedded X509 certificate fields.

* sample/sample-keys/

  Sample RSA keys and certificates.  DON'T USE THESE FILES
  FOR ANYTHING OTHER THAN TESTING BECAUSE THEY ARE TOTALLY INSECURE.

* sample/sample-config-files/

  A collection of OpenVPN config files and scripts from
  the HOWTO at http://openvpn.net/howto.html

*************************************************************************

Note that easy-rsa and tap-windows are now maintained in their own subprojects.
Their source code is available here:

  https://github.com/OpenVPN/easy-rsa
  https://github.com/OpenVPN/tap-windows6

Community-provided Windows installers (MSI) and Debian packages are built from

  https://github.com/OpenVPN/openvpn-build

See the INSTALL file for usage information.