CVE-2025-38590
kernel: net/mlx5e: Remove skb secpath if xfrm state is not found
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · August 19, 2025
Updated · October 26, 2026
Description
A flaw was found in the Linux kernel's Mellanox network driver (mlx5). This vulnerability allows an attacker to cause a denial of service (DoS) by triggering a kernel crash. When the driver processes hardware-decrypted Internet Protocol Security (IPsec) packets whose security state has already been removed, it fails to clear the associated security metadata from the packet buffer. Subsequent network policy checks then dereference an invalid state pointer, resulting in a system crash.
Statement
This bug in the mlx5 IPsec receive offload path could trigger a kernel crash when hardware reported a decrypted packet with an already freed xfrm state. The driver failed to clear the secpath extension on the skb, leaving sp->len at zero, which later caused __xfrm_policy_check() to dereference an invalid state pointer. For the Red Hat Enterprise Linux (all versions) the Kernel config param CONFIG_MLX5_EN_MACSEC disabled, so this bug not actual (not affected).
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
To mitigate this issue, prevent module mlx5_core from being loaded. Please see https://access.redhat.com/solutions/41278 for how to blacklist a kernel module to prevent it from loading automatically.
CVSS / CWE
CVSS 3.1 · 6.2CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CWE-476 · NULL Pointer Dereference