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

CVE-2026-97599: Linux Kernel ieee802154 Use-After-Free Vulnerability

CVE-2026-97599 is a use-after-free flaw in Linux kernel ieee802154 hwsim that causes double-free errors during unserialized PIB updates. This post explains its technical details, affected versions, impact, and mitigation steps.

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-97599 Overview

CVE-2026-97599 is a double-free vulnerability in the Linux kernel's ieee802154 hwsim driver. The flaw resides in hwsim_update_pib(), which performs an unserialized read-swap-free of the phy->pib pointer. The function assumes the RTNL (Routing Netlink) lock is held, but the mac802154 scan worker invokes drv_set_channel() without that lock. Concurrent updates on the same phy can read the same pib_old and both call kfree_rcu() on it, freeing the object twice. On kernels using SLUB percpu sheaves to batch kfree_rcu(), the condition surfaces as a KASAN invalid-free in rcu_free_sheaf().

Critical Impact

Concurrent channel updates in the IEEE 802.15.4 hwsim driver trigger a double-free, leading to kernel memory corruption and potential denial of service.

Affected Products

  • Linux kernel versions containing the ieee802154/hwsim driver prior to the fix commits
  • Stable kernel branches referenced in commits 979d5b8, 9973b3a, d3b8f26, and db6442d
  • Systems that load the mac802154_hwsim module for IEEE 802.15.4 simulation

Discovery Timeline

  • 2026-09-25 - CVE-2026-97599 published to NVD
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-97599

Vulnerability Analysis

The hwsim_update_pib() function in the IEEE 802.15.4 hardware simulator driver manages the PHY Information Base (pib) pointer attached to each simulated phy. The original implementation reads the old pointer via rtnl_dereference(), assigns a new value with rcu_assign_pointer(), and schedules the old object for release with kfree_rcu(). This sequence is only safe when a single writer holds the RTNL lock.

The mac802154 scan worker calls drv_set_channel() outside the RTNL. When that path and an RTNL-protected update run on the same phy, both read the identical pib_old reference. Both threads then queue the same object for RCU-deferred free. The result is a double-free of a kernel heap object, detected by KASAN as an invalid free inside rcu_free_sheaf() on kernels using SLUB percpu sheaves.

Root Cause

The struct hwsim_phy carries no dedicated lock protecting the pib field. The code relies on an implicit assumption that all callers hold the RTNL, but the mac802154 subsystem violates this contract from the scan worker. The misleading rtnl_dereference() masks the race by suggesting a serialization guarantee that does not exist across all call sites.

Attack Vector

Exploitation requires local access and the ability to trigger concurrent channel operations on a simulated 802.15.4 phy. A local user able to initiate scanning while another channel update runs can race the two code paths. The outcome is kernel heap corruption, kernel panic, or exploitable use-after-free conditions depending on allocator behavior. The vulnerability is not remotely reachable and depends on the mac802154_hwsim module being loaded.

The upstream fix adds a dedicated spinlock to struct hwsim_phy and performs the pointer swap atomically using rcu_replace_pointer() under that lock. The misleading rtnl_dereference() is removed in favor of the new serialization primitive. See the fix commits 979d5b8, 9973b3a, d3b8f26, and db6442d for the complete patch.

Detection Methods for CVE-2026-97599

Indicators of Compromise

  • KASAN reports flagging invalid-free or double-free inside rcu_free_sheaf() or kfree_rcu() call chains
  • Kernel oops or panic traces referencing hwsim_update_pib and mac802154_hwsim
  • Unexpected crashes during 802.15.4 scanning or channel-change operations on test systems

Detection Strategies

  • Enable KASAN on development or test kernels running the mac802154_hwsim module and monitor dmesg for allocator reports
  • Audit loaded modules on production systems to confirm whether mac802154_hwsim is present and required
  • Correlate kernel crash dumps with 802.15.4 scan or set_channel activity in syslog

Monitoring Recommendations

  • Forward kernel ring buffer and crash dump data to a central log store for pattern matching on hwsim_update_pib traces
  • Alert on repeated kernel oops events on hosts running wireless simulation workloads
  • Track Linux kernel package versions across the fleet to confirm patched builds are deployed

How to Mitigate CVE-2026-97599

Immediate Actions Required

  • Apply the stable kernel update that includes the serialization fix referenced in the upstream commits
  • Unload the mac802154_hwsim module on systems that do not require 802.15.4 simulation using modprobe -r mac802154_hwsim
  • Blacklist the module on hosts where it is not needed to prevent accidental loading

Patch Information

The fix is distributed through the Linux stable tree in commits 979d5b8, 9973b3a, d3b8f26, and db6442d. The patch adds a lock to struct hwsim_phy and converts the pointer swap in hwsim_update_pib() to use rcu_replace_pointer() under that lock. Distribution kernel package updates should be installed through standard vendor channels.

Workarounds

  • Prevent loading the mac802154_hwsim module by adding blacklist mac802154_hwsim to /etc/modprobe.d/
  • Restrict CAP_NET_ADMIN on untrusted local accounts to reduce the ability to trigger scan and channel operations
  • Disable 802.15.4 scanning workflows on affected hosts until the patched kernel is deployed

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.