Executive brief
A race condition vulnerability was identified in the Linux kernel's IPsec (XFRM) subsystem. This flaw could allow a local attacker to cause a system crash or potentially execute unauthorized code by exploiting a 'use-after-free' condition during the deletion of network security policies. The issue occurs when the system attempts to access memory that has already been released during a concurrent network configuration update.
Technical details
A use-after-free (UAF) vulnerability exists in the Linux kernel's XFRM subsystem due to a race condition between policy deletion (XFRM_MSG_DELPOLICY) and hash rebuilding (XFRM_MSG_NEWSPDINFO). In xfrm_policy_bysel_ctx(), the xfrm_policy_lock is dropped before calling xfrm_policy_inexact_prune_bin(bin). During this window, a concurrent xfrm_hash_rebuild() can trigger __xfrm_policy_inexact_flush(), which frees the 'bin' structure via kfree_rcu(). Subsequent access to the freed 'bin' results in a UAF. The fix involves moving the pruning logic inside the critical section protected by xfrm_policy_lock. This affects the net/xfrm/xfrm_policy.c component.
Affected products
- Linux Linux 6be3b0db6db8 to 7f2d76c9c032
Timeline
- 2026-06-02: other: Vulnerability fixed in upstream kernel code
- 2026-06-25: advisory: CVE-2026-53239 published
References
- https://git.kernel.org/stable/c/25c8c7fb3b0b9668c7d05e209f58c158d2b020c7
- https://git.kernel.org/stable/c/42827d03f8009a6a218bacab153e21f39d6a121c
- https://git.kernel.org/stable/c/7f2d76c9c03257c0782afef9d95321fa04096f60
- https://git.kernel.org/stable/c/88697cf980222d5906a37bf47662dac0732e2a0f
- https://git.kernel.org/stable/c/8fc536e9f6856230f19c7d13e71af064b6a77b22
- https://git.kernel.org/stable/c/b5316e2b8614a87d8736941972441cb47bfd4491
- https://git.kernel.org/stable/c/c4c1ea36d83bf3c4569468ca5b8b614fda1bf821