CVEfocus › CVE database › CVE-2024-2357

CVE-2024-2357IKEv2 misconfiguration can cause libreswan to abort and restart

CVSS 6.5 MediumEPSS 1.3% (higher than 70% of CVEs)Published 2024-03-11Updated 2025-02-13Assigner: libreswan

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

12Fixed
3Fix pending
2Under investigation
2Will not fix
2Not affected

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04libreswanNot affected
vulnerable_code_not_present
Ubuntu 25.10libreswanNot affected
vulnerable_code_not_present
Ubuntu 24.04libreswanUnder investigationUBUNTU-CVE-2024-2357
Ubuntu 22.04libreswanUnder investigationUBUNTU-CVE-2024-2357
Ubuntu 20.04libreswanFix pendingUBUNTU-CVE-2024-2357
Ubuntu 18.04libreswanFix pendingUBUNTU-CVE-2024-2357
Debian 13libreswanFixed4.14-1DEBIAN-CVE-2024-2357
Debian 12libreswanFix pendingDEBIAN-CVE-2024-2357
Red Hat Enterprise Linux 9libreswanFixed0:4.12-1.el9_3.1RHSA-2024:2565
Red Hat Enterprise Linux 8libreswanFixed0:4.12-2.el8_9.2RHSA-2024:1998
Red Hat Enterprise Linux 7libreswanWill not fix
Out of support scope
Red Hat Enterprise Linux 6libreswanWill not fix
Out of support scope
AlmaLinux 9libreswanFixed4.12-2.el9_4.alma.1ALSA-2024:2033
AlmaLinux 8libreswanFixed4.12-2.el8_9.2.alma.1ALSA-2024:1998
Rocky Linux 9libreswanFixed0:4.12-2.el9_4RLSA-2024:2565
Rocky Linux 8libreswanFixed0:4.12-2.el8_9.2RLSA-2024:1998
Alpine Linux 3.24libreswanFixed4.15-r0ALPINE-CVE-2024-2357
Alpine Linux 3.23libreswanFixed4.15-r0ALPINE-CVE-2024-2357
Alpine Linux 3.22libreswanFixed4.15-r0ALPINE-CVE-2024-2357
Alpine Linux 3.21libreswanFixed4.15-r0ALPINE-CVE-2024-2357
Alpine Linux 3.20libreswanFixed4.15-r0ALPINE-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.

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:

References

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.