CVE Database›Document archive›CVE-2024-2357

CVE-2024-2357

libreswan: Missing PreSharedKey for connection can cause crash

Loading…

Severity

Moderate

Red Hat Product Security

5

CVSS 3.1

Review impact separately from score.

Published · March 11, 2024

Updated · January 29, 2026

Description

A flaw was found in Libreswan. This issue causes 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 automatically added on startup using the auto= keyword, it can cause repeated crashes, leading to a denial of service.

Statement

Libreswan may restart repeatedly under certain IKEv2 retransmission scenarios when using PreSharedKeys (authby=secret) if the connection cannot find a matching configured secret. If such a connection is added automatically on startup using the auto= keyword, it can lead to repeated crashes, causing a denial of service. The vulnerability arises when IKEv2 fails to find its PreSharedKey for the AUTH payload in the IKE_AUTH Exchange, resulting in assertion failure and daemon crashes. This vulnerability is triggered by local misconfiguration, and there is no known exploitation by external peers.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

As a workaround to prevent the misconfiguration from causing the crash, place an unguessable long random "catch-all" secret in /etc/ipsec.secrets, for example, using the following command:

echo -e "# CVE-2024-2357 workaround\n: 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.

CVSS / CWE

CVSS 3.1 · 5
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:N/A:H

CWE-400 · Uncontrolled Resource Consumption