Skip to main content
Vulnerability Database/CVE-2026-98230

CVE-2026-98230: Linux Kernel Use-After-Free Vulnerability

CVE-2026-98230 is a use-after-free flaw in the Linux kernel xfrm subsystem affecting state_cache memory handling. Attackers could exploit this to corrupt memory and trigger crashes. This article covers technical details, impact assessment, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-98230 Overview

CVE-2026-98230 is a use-after-free vulnerability in the Linux kernel's xfrm (IPsec transform) subsystem. The flaw resides in the __xfrm_state_delete() path, where state_cache and state_cache_input lists were unhashed using hlist_del_rcu() instead of hlist_del_init_rcu(). A second deletion of the same xfrm_state object writes through LIST_POISON2, producing a write use-after-free once the slab is reused. This corruption can lead to a subsequent read use-after-free in xfrm_input_state_lookup() when hlist_for_each_entry_rcu follows a dangling pointer.

Critical Impact

Local attackers with low privileges can trigger kernel memory corruption, enabling privilege escalation or denial of service against IPsec-enabled Linux systems.

Affected Products

  • Linux kernel versions containing commit 14acf9652e56 prior to the fix
  • Linux distributions shipping affected mainline and stable kernels
  • Systems using IPsec/XFRM transformations and state caching

Discovery Timeline

  • 2026-10-06 - CVE-2026-98230 published to NVD
  • 2026-10-07 - Last updated in NVD database

Technical Details for CVE-2026-98230

Vulnerability Analysis

The Linux kernel xfrm subsystem manages IPsec security associations through xfrm_state objects linked across multiple hash lists. Commit 14acf9652e56 ("xfrm: defensively unhash xfrm_state lists in __xfrm_state_delete") converted the bydst, bysrc, byseq, and byspi lists from hlist_del_rcu() to hlist_del_init_rcu(). The intent was to make a second __xfrm_state_delete() call on the same object a safe no-op.

The conversion omitted two additional lists: state_cache and state_cache_input. These continued to use hlist_del_rcu(), which leaves pprev set to LIST_POISON2 rather than NULL. As a result, hlist_unhashed() returns false on an already-deleted node, and a second deletion enters __hlist_del() and performs WRITE_ONCE(*pprev, next) through the poison pointer.

Root Cause

The root cause is inconsistent list-unhashing semantics across the xfrm_state deletion paths. Because hlist_del_rcu() does not reset pprev to NULL, the defensive check in __xfrm_state_delete() fails to detect that the node was already removed. Once the slab backing the freed xfrm_state is reused, the stray write corrupts arbitrary kernel memory, and traversals of the affected buckets dereference dangling next pointers.

Attack Vector

Exploitation requires local access and the ability to influence IPsec state lifecycle events, for example by creating and tearing down security associations via netlink. An attacker races or forces a second __xfrm_state_delete() on the same object to trigger the write use-after-free. The resulting memory corruption can be shaped into a read use-after-free in xfrm_input_state_lookup(), giving a primitive suitable for privilege escalation on vulnerable kernels. The fix switches state_cache and state_cache_input to hlist_del_init_rcu() to match the other four lists. See the upstream commits for details: Kernel Git Commit 2afb8dc, Kernel Git Commit 4748c27, Kernel Git Commit 9b74a47, and Kernel Git Commit fb38fb7.

Detection Methods for CVE-2026-98230

Indicators of Compromise

  • Kernel oops or panic messages referencing __xfrm_state_delete, xfrm_input_state_lookup, or __hlist_del
  • KASAN use-after-free reports naming xfrm_state slab objects
  • Unexpected IPsec connectivity failures correlated with crashes on hosts using XFRM state caching

Detection Strategies

  • Enable KASAN on test kernels to surface the write and read use-after-free conditions during fuzzing or regression testing
  • Monitor kernel ring buffer (dmesg) and journald for repeated faults originating in net/xfrm/xfrm_state.c
  • Audit workloads that create and delete large volumes of xfrm_state entries, which increase exposure to the double-delete race

Monitoring Recommendations

  • Centralize kernel crash telemetry and alert on new signatures involving xfrm symbols
  • Track installed kernel versions across the fleet to identify hosts missing the backported fix
  • Correlate netlink XFRM_MSG_DELSA activity with crash events to identify suspicious state manipulation

How to Mitigate CVE-2026-98230

Immediate Actions Required

  • Apply the stable kernel updates that include the hlist_del_init_rcu() conversion for state_cache and state_cache_input
  • Prioritize patching on multi-tenant hosts, IPsec gateways, and any system where untrusted local users can influence XFRM state
  • Rebuild and reboot into the fixed kernel; live patching is only effective if the vendor ships an equivalent hotfix

Patch Information

The upstream fix switches state_cache and state_cache_input to hlist_del_init_rcu(), aligning them with the other four xfrm_state lists. Patches are available in the stable tree at Kernel Git Commit 2afb8dc, Kernel Git Commit 4748c27, Kernel Git Commit 9b74a47, and Kernel Git Commit fb38fb7. Consult your distribution's security tracker for backported package versions.

Workarounds

  • Restrict CAP_NET_ADMIN so unprivileged users cannot create or delete IPsec security associations
  • Disable the xfrm subsystem on hosts that do not require IPsec by blacklisting related modules
  • Apply mandatory access controls (SELinux, AppArmor) to constrain processes permitted to issue XFRM netlink operations
bash
# Verify the running kernel does not expose unprivileged XFRM access
sysctl -a | grep -E 'xfrm|user_namespace'

# Restrict unprivileged user namespaces, which can be abused to gain CAP_NET_ADMIN
sysctl -w kernel.unprivileged_userns_clone=0

# Blacklist xfrm modules on hosts that do not require IPsec
echo 'blacklist xfrm_user' | sudo tee /etc/modprobe.d/disable-xfrm.conf
echo 'blacklist xfrm_algo' | sudo tee -a /etc/modprobe.d/disable-xfrm.conf

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.