CVE-2026-98330: wifi: cfg80211: get the wiphy out of a dying network namespace
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
wifi: cfg80211: get the wiphy out of a dying network namespace
When a network namespace is destroyed, cfg80211_pernet_exit() moves any wiphy back to the initial namespace, and just warns if that fails. But moving an interface can fail (due to allocation failures), and then the wiphy is left behind with a garbage netns pointer:
Kernel mode fault at addr 0x30
genlmsg_multicast_netns.constprop.0+0x46/0xcf [cfg80211] nl80211_notify_wiphy+0xcd/0xe8 [cfg80211] wiphy_unregister+0x169/0x3fc [cfg80211]
Note that commit debac3a20dec ("net: Remove conflicting altnames for dying netns in __dev_change_net_namespace().") fixed another path that could reach it without allocation failures.
Remove interfaces that cannot be moved instead of failing the switch, so that the wiphy always ends up in the initial namespace. In this case the netdev core will unregister the interfaces anyway.
The Linux kernel CVE team has assigned CVE-2026-98330 to this issue.
Affected and fixed versions
===========================
Issue introduced in 2.6.32 with commit 463d018323851a608eef52a9427b0585005c647f and fixed in 6.18.54 with commit caa02072b2986d4b0e7a824de05782ef7b03a0ba Issue introduced in 2.6.32 with commit 463d018323851a608eef52a9427b0585005c647f and fixed in 7.2.8 with commit b949b2720688691f1e41bdbfbe3df2b6dc77c34d Issue introduced in 2.6.32 with commit 463d018323851a608eef52a9427b0585005c647f and fixed in 7.3-rc4 with commit 4635b1a1c1d693178a537446a6e09963f0fdae52
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-98330
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/wireless/core.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/caa02072b2986d4b0e7a824de05782ef7b03a0ba https://git.kernel.org/stable/c/b949b2720688691f1e41bdbfbe3df2b6dc77c34d https://git.kernel.org/stable/c/4635b1a1c1d693178a537446a6e09963f0fdae52