HIGH Introduced in 4.19
mac802154 PibUpdate DoubleFree
CVE-2026-97599
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: ieee802154: hwsim: serialize pib updates to fix double-free hwsim_update_pib() does an unserialized read-swap-free of phy->pib: pib_old = rtnl_dereference(phy->pib); ... rcu_assign_pointer(phy->pib, pib); kfree_rcu(pib_old, rcu); It assumes the RTNL is held, but ->set_channel is not always called under it: the mac802154 scan worker changes channels via drv_set_channel() without the RTNL. Such an update can race an RTNL-held one on the same phy; both read the same pib_old and both kfree_rcu() it, double-freeing the object. With SLUB percpu sheaves batching kfree_rcu(), this surfaces as a KASAN invalid-free in rcu_free_sheaf(). struct hwsim_phy has no lock for pib. Add one and make the swap atomic with rcu_replace_pointer() under it, dropping the misleading rtnl_dereference().
02KernelScan AI Analysis
Risk summary
A local attacker who can trigger channel-scan operations on a mac802154 hwsim virtual WPAN device can race two concurrent configuration updates so that both free the same kernel heap object, producing a double-free. This is exploitable for kernel memory corruption, leading to potential code execution or denial of service. The hwsim module must be loaded, and the attack requires timing a narrow race window.
Vulnerability analysis
A virtual WPAN device driver can double-free a heap object when two configuration updates race. One update path is triggered by a background channel change, while another comes from an ordinary configuration request; both paths read the same old object and free it because the update was not serialized. The fix adds dedicated locking around the replacement so only one path at a time can see and release the old object. The flaw is reachable by any local process that can trigger channel or configuration changes on the hwsim virtual device, which requires the driver module to be loaded.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.1 | 4.19 | 6.1.191 | 8f44a61f8165 |
| 6.12 | 4.19 | 6.12.111 | 9973b3a67a75 |
| 6.18 | 4.19 | 6.18.53 | d3b8f264ce09 |
| 6.6 | 4.19 | 6.6.158 | e3b4681197aa |
| 7.2 | 4.19 | 7.2.7 | db6442deecb1 |
| mainline | 4.19 | 7.3 | 979d5b8de8ed |
| cip/6.12 | 4.19 | 6.12.111-cip32 | 9973b3a67a75 |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.111-cip32 |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.190-cip62) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.272-cip79) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 5.10.272-cip79-rt35) |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip136) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |