openvpn: fix multiple CVEs
PATCH 1/1 openvpn: fix multiple CVEs
From: Meenali Gupta <[email protected]>
CVE-2024-24974:
Previously, the VPN tool’s Windows implementation allowed remote access to its service pipe, posing a security risk. Using compromised credentials, a threat actor could communicate with OpenVPN to orchestrate attacks.
CVE-2024-27903:
OpenVPN has mitigated the risk by restricting plugin load. Plugins can now only be loaded from the software’s install directory, the Windows system directory, and the plugin_dir directory under the software’s installation.
CVE-2024-27459:
This vulnerability affects the interactive service component, potentially leading to local privilege escalation when triggered by an oversized message.To mitigate this risk, the VPN solution now terminates connections upon detecting excessively large messages, preventing stack overflow exploits.
References:
https://openvpn.net/security-advisory/ovpnx-vulnerability-cve-2024-27903-cve-2024-27459-cve-2024-24974/
https://socradar.io/openvpn-fixed-multiple-vulnerabilities-on-windows/
https://community.openvpn.net/openvpn/wiki/CVE-2024-27903
https://community.openvpn.net/openvpn/wiki/CVE-2024-27459
https://community.openvpn.net/openvpn/wiki/CVE-2024-24974
--- .../openvpn/openvpn/CVE-2024-24974.patch | 49 ++++++++ .../openvpn/openvpn/CVE-2024-27459.patch | 99 +++++++++++++++ .../openvpn/openvpn/CVE-2024-27903.patch | 119 ++++++++++++++++++ .../recipes-support/openvpn/openvpn_2.5.6.bb | 6 +- 4 files changed, 272 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-support/openvpn/openvpn/CVE-2024-24974.patch create mode 100644 meta-networking/recipes-support/openvpn/openvpn/CVE-2024-27459.patch create mode 100644 meta-networking/recipes-support/openvpn/openvpn/CVE-2024-27903.patch
meta-networking/recipes-support/openvpn/openvpn/CVE-2024-24974.patch new file +49 -0
@@ -0,0 +1,49 @@ +From 2c1de0f0803360c0a6408f754066bd3a6fb28237 Mon Sep 17 00:00:00 2001 +From: Lev Stipakov <[email protected]> +Date: Tue, 19 Mar 2024 17:16:07 +0200 +Subject: [PATCH] interactive.c: disable remote access to the service pipe + +Remote access to the service pipe is not needed and might +be a potential attack vector. + +For example, if an attacker manages to get credentials for +a user which is the member of "OpenVPN Administrators" group +on a victim machine, an attacker might be able to communicate +with the privileged interactive service on a victim machine +and start openvpn processes remotely. + +CVE: 2024-24974 + +Microsoft case number: 85925 + +Reported-by: Vladimir Tokarev <[email protected]> +Change-Id: I8739c5f127e9ca0683fcdbd099dba9896ae46277 +Signed-off-by: Lev Stipakov <[email protected]> +Acked-by: Heiko Hund <[email protected]> +Message-Id: <[email protected]> +URL: https://www.mail-archive.com/[email protected]/msg28419.html +Signed-off-by: Gert Doering <[email protected]> + +CVE:CVE-2024-24974 +Upstream-Status: Backport [https://github.com/OpenVPN/openvpn/commit/2c1de0f0803360c0a6408f754066bd3a6fb28237] + +Signed-off-by: Meenali Gupta <[email protected]> +--- + src/openvpnserv/interactive.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c +index 3b120ae..5e3ff12 100644 +--- a/src/openvpnserv/interactive.c ++++ b/src/openvpnserv/interactive.c +@@ -1994,7 +1994,7 @@ CreateClientPipeInstance(VOID) + + openvpn_sntprintf(pipe_name, _countof(pipe_name), TEXT("\\\\.\\pipe\\" PACKAGE "%s\\service"), service_instance); + pipe = CreateNamedPipe(pipe_name, flags, +- PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE, ++ PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_REJECT_REMOTE_CLIENTS, + PIPE_UNLIMITED_INSTANCES, 1024, 1024, 0, NULL); + if (pipe == INVALID_HANDLE_VALUE) + { +-- +2.40.0
meta-networking/recipes-support/openvpn/openvpn/CVE-2024-27459.patch new file +99 -0
99 lines not on this page · raw message
meta-networking/recipes-support/openvpn/openvpn/CVE-2024-27903.patch new file +119 -0
119 lines not on this page · raw message
meta-networking/recipes-support/openvpn/openvpn_2.5.6.bb +5 -1
@@ -10,7 +10,11 @@ inherit autotools systemd update-rc.d SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \ file://openvpn \ file://[email protected] \ - file://openvpn-volatile.conf" + file://openvpn-volatile.conf \ + file://CVE-2024-24974.patch \ + file://CVE-2024-27459.patch \ + file://CVE-2024-27903.patch \ + " UPSTREAM_CHECK_URI = "https://openvpn.net/community-downloads"
Signature · 1 line
2.40.0