CVE-2024-9050Networkmanager-libreswan: local privilege escalation via leftupdown
A flaw was found in the libreswan client plugin for NetworkManager (NetkworkManager-libreswan), where it fails to properly sanitize the VPN configuration from the local unprivileged user. In this configuration, composed by a key-value format, the plugin fails to escape special characters, leading the application to interpret values as keys. One of the most critical parameters that could be abused by a malicious user is the `leftupdown`key. This key takes an executable command as a value and is used to specify what executes as a callback in NetworkManager-libreswan to retrieve configuration settings back to NetworkManager. As NetworkManager uses Polkit to allow an unprivileged user to control the system's network configuration, a malicious actor could achieve local privilege escalation and potential code execution as root in the targeted machine by creating a malicious configuration.
What to do
Fixed builds are available from AlmaLinux, Red Hat, Rocky Linux: see the table below for the fixed version per release.
Red Hat has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Red Hat Enterprise Linux 10 | NetworkManager-libreswan | Fix pending Affected | ||
| Red Hat Enterprise Linux 10 | NetworkManager-libreswan-gnome | Fix pending Affected | ||
| Red Hat Enterprise Linux 9 | NetworkManager-libreswan | Fixed | 0:1.2.22-4.el9_5 | RHSA-2024:9555 |
| Red Hat Enterprise Linux 9 | NetworkManager-libreswan-gnome | Fixed | 0:1.2.22-4.el9_5 | RHSA-2024:9555 |
| Red Hat Enterprise Linux 8 | NetworkManager-libreswan | Fixed | 0:1.2.10-7.el8_10 | RHSA-2024:8353 |
| Red Hat Enterprise Linux 8 | NetworkManager-libreswan-gnome | Fixed | 0:1.2.10-7.el8_10 | RHSA-2024:8353 |
| AlmaLinux 9 | NetworkManager-libreswan | Fixed | 1.2.22-4.el9_5 | ALSA-2024:9555 |
| AlmaLinux 9 | NetworkManager-libreswan-gnome | Fixed | 1.2.22-4.el9_5 | ALSA-2024:9555 |
| AlmaLinux 8 | NetworkManager-libreswan | Fixed | 1.2.10-7.el8_10 | ALSA-2024:8353 |
| AlmaLinux 8 | NetworkManager-libreswan-gnome | Fixed | 1.2.10-7.el8_10 | ALSA-2024:8353 |
| Rocky Linux 9 | NetworkManager-libreswan | Fixed | 0:1.2.22-4.el9_5 | RLSA-2024:9555 |
| Rocky Linux 8 | NetworkManager-libreswan | Fixed | 0:1.2.10-7.el8_10 | RLSA-2024:8353 |
What the vendor says
As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- NetworkManager-libreswan: affected: before 1.2.24; fixed in
1.2.24 - Red Hat Enterprise Linux 7.7 Advanced Update Support
- Red Hat Enterprise Linux 7 Extended Lifecycle Support
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 8.2 Advanced Update Support
- Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support
- Red Hat Enterprise Linux 8.4 Telecommunications Update Service
- Red Hat Enterprise Linux 8.4 Update Services for SAP Solutions
- Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support
- Red Hat Enterprise Linux 8.6 Telecommunications Update Service
- Red Hat Enterprise Linux 8.6 Update Services for SAP Solutions
- Red Hat Enterprise Linux 8.8 Extended Update Support
Workaround: A mitigation for this issue is either unavailable or the existing options do not meet Red Hat Product Security's standards for ease of use, deployment, widespread applicability, or stability. One potential approach is to prevent local users from controlling networking through polkit. However, this would also block them from connecting to new Wi-Fi networks, which is not ideal for laptops but might be acceptable for workstations. Server customers typically don't need to be concerned, as they generally don't have local users capable of exploiting the bug.
Vendor advisories:
- https://access.redhat.com/errata/RHSA-2024:8312 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2024:8338 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2024:8352 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2024:8353 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2024:8354 (vendor-advisory)
- https://access.redhat.com/errata/RHSA-2024:8355 (vendor-advisory)
References
- https://access.redhat.com/errata/RHSA-2024:8312
- https://access.redhat.com/errata/RHSA-2024:8338
- https://access.redhat.com/errata/RHSA-2024:8352
- https://access.redhat.com/errata/RHSA-2024:8353
- https://access.redhat.com/errata/RHSA-2024:8354
- https://access.redhat.com/errata/RHSA-2024:8355
- https://access.redhat.com/errata/RHSA-2024:8356
- https://access.redhat.com/errata/RHSA-2024:8357
- https://access.redhat.com/errata/RHSA-2024:8358
- https://access.redhat.com/errata/RHSA-2024:9555
- https://access.redhat.com/errata/RHSA-2024:9556
- https://access.redhat.com/security/cve/CVE-2024-9050
- https://bugzilla.redhat.com/show_bug.cgi?id=2313828
- https://gitlab.gnome.org/GNOME/NetworkManager-libreswan/-/commit/dcf8acfb25bd31e4b8cbd20c229da660238b5c1b
- https://www.openwall.com/lists/oss-security/2024/10/25/1
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.