CVE-2024-2357IKEv2 misconfiguration can cause libreswan to abort and restart
The Libreswan Project was notified of an issue causing libreswan to restart under some IKEv2 retransmit scenarios when a connection is configured to use PreSharedKeys (authby=secret) and the connection cannot find a matching configured secret. When such a connection is automatically added on startup using the auto= keyword, it can cause repeated crashes leading to a Denial of Service.
What to do
Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux: see the table below for the fixed version per release.
Debian, Ubuntu have 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 |
|---|---|---|---|---|
| Ubuntu 26.04 | libreswan | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | libreswan | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | libreswan | Under investigation | UBUNTU-CVE-2024-2357 | |
| Ubuntu 22.04 | libreswan | Under investigation | UBUNTU-CVE-2024-2357 | |
| Ubuntu 20.04 | libreswan | Fix pending | UBUNTU-CVE-2024-2357 | |
| Ubuntu 18.04 | libreswan | Fix pending | UBUNTU-CVE-2024-2357 | |
| Debian 13 | libreswan | Fixed | 4.14-1 | DEBIAN-CVE-2024-2357 |
| Debian 12 | libreswan | Fix pending | DEBIAN-CVE-2024-2357 | |
| Red Hat Enterprise Linux 9 | libreswan | Fixed | 0:4.12-1.el9_3.1 | RHSA-2024:2565 |
| Red Hat Enterprise Linux 8 | libreswan | Fixed | 0:4.12-2.el8_9.2 | RHSA-2024:1998 |
| Red Hat Enterprise Linux 7 | libreswan | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | libreswan | Will not fix Out of support scope | ||
| AlmaLinux 9 | libreswan | Fixed | 4.12-2.el9_4.alma.1 | ALSA-2024:2033 |
| AlmaLinux 8 | libreswan | Fixed | 4.12-2.el8_9.2.alma.1 | ALSA-2024:1998 |
| Rocky Linux 9 | libreswan | Fixed | 0:4.12-2.el9_4 | RLSA-2024:2565 |
| Rocky Linux 8 | libreswan | Fixed | 0:4.12-2.el8_9.2 | RLSA-2024:1998 |
| Alpine Linux 3.24 | libreswan | Fixed | 4.15-r0 | ALPINE-CVE-2024-2357 |
| Alpine Linux 3.23 | libreswan | Fixed | 4.15-r0 | ALPINE-CVE-2024-2357 |
| Alpine Linux 3.22 | libreswan | Fixed | 4.15-r0 | ALPINE-CVE-2024-2357 |
| Alpine Linux 3.21 | libreswan | Fixed | 4.15-r0 | ALPINE-CVE-2024-2357 |
| Alpine Linux 3.20 | libreswan | Fixed | 4.15-r0 | ALPINE-CVE-2024-2357 |
What the vendor says
As published in the CVE record by libreswan, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- The Libreswan Project (www.libreswan.org) libreswan: affected: 4.2 to 4.12, 5.0 not affected
Solution: This issue is fixed in 4.13, 5.0 and all later versions.
Workaround: As a workaround, one can place an unguessable long random default secret in /etc/ipsec.secrets, for example using the following command: echo -e "# CVE-2024-2357 workaround : PSK "$(openssl rand -hex 32)"" >> /etc/ipsec.secrets This will ensure a PSK secret is always found, but it will always be wrong, and thus authentication will still properly fail.
Vendor advisories:
- https://libreswan.org/security/CVE-2024-2357 (vendor-advisory)
References
- https://libreswan.org/security/CVE-2024-2357
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/EJZJYFHKBIJ4ZK5GAWWFFR3AKJS6O5JX/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/HEM46ALKF7NG6CAUKZ7KQERVOHWQIQKY/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TVQ7MZY6LFFGRWAJNTKKN2VSEFS2VPAR/
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.