CVE-2026-72451 PUBLISHED

xfrm: Fix xfrm state cache insertion race

Assigner: Linux
Reserved: 09.08.2026 Published: 15.08.2026 Updated: 17.08.2026

In the Linux kernel, the following vulnerability has been resolved:

xfrm: Fix xfrm state cache insertion race

The xfrm input state cache insertion code checks the validity of the state before acquiring the global xfrm_state_lock. Thus it's possible for someone else to kill the state after it passed the validity check, and then the insertion will add the dead state to the cache.

Fix this by moving the validity check inside the lock.

This entire function is called on the input path, where BH must be off (e.g., the caller of this function xfrm_input acquires its spinlocks without disabling BH).

So there is no need to disable BH here or take the RCU read lock. Remove both and replace them with an assertion that trips if BH is accidentally enabled on some future calling path.

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 9.8

AV:N - The flaw is hit on the inbound IPsec path (xfrm_input/xfrm_input_state_lookup) when processing remote ESP/AH or UDP-encap ESP packets on internet-facing VPN gateways, cloud IPsec endpoints, and other systems terminating IPsec from the network. AC:L - An attacker can drive both sides of the race by flooding inbound IPsec packets while concurrently deleting or expiring the same SA (netlink XFRM_MSG_DELSA with CAP_NET_ADMIN in a user namespace, or kernel hard-expiry timers during rekey). PR:N - Remote exploitation needs no privileges on the victim: crafted ESP/AH packets trigger the lookup while the kernel or IKE stack concurrently tears down the matching SA via timers, rekey, or administrative SA deletion. UI:N - No victim user interaction is required beyond normal IPsec operation on hosts that already receive and decrypt IPsec traffic; exploitation is driven entirely by attacker-sent packets and concurrent SA teardown. S:U - The bug corrupts kernel memory on the IPsec endpoint itself and enables standard kernel privilege escalation; it does not cross VM, container, or IOMMU security boundaries. C:H - A deleted xfrm_state can be inserted into the per-CPU input cache and later referenced after free, creating a use-after-free that enables heap spraying and arbitrary kernel memory disclosure via stale structure fields. I:H - Subsequent cache hits dereference the freed xfrm_state (spin_lock, type->input function pointers, crypto context pointers), providing controllable heap corruption primitives suitable for arbitrary kernel code execution. A:H - Dereferencing freed xfrm_state objects during input processing can cause kernel oops/panic, and successful exploitation can crash or hang the system; use-after-free on the softirq receive path inherently threatens availability.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from 5e4334dc39443645415450163ff5ff1ee7e79784 to 6dab4dec9a49121d079981ac913569f232c06b06 (excl.)
  • affected from 81a331a0e72ddc2f75092603d9577bd1a0ca23ad to a1a3360a0c44b8b5c134db2a9d0667b61c9cf523 (excl.)
  • affected from 81a331a0e72ddc2f75092603d9577bd1a0ca23ad to 041859fd55c81ea55e76d051e39b7b79975b8c7d (excl.)
  • affected from 81a331a0e72ddc2f75092603d9577bd1a0ca23ad to ddd3d0132920319ac426e12456013eadbae67e15 (excl.)
  • affected from 6.12.13 to 6.12.97 (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 6.13 is affected
  • unaffected from 0 to 6.13 (excl.)
  • unaffected from 6.12.97 to 6.12.* (incl.)
  • unaffected from 6.18.40 to 6.18.* (incl.)
  • unaffected from 7.1.5 to 7.1.* (incl.)
  • unaffected from 7.2 to * (incl.)

References