CVE-2026-74325: wifi: mt76: use kfree_rcu for offchannel link in mt76_put_vif_phy_link
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
wifi: mt76: use kfree_rcu for offchannel link in mt76_put_vif_phy_link
mt76_put_vif_phy_link() frees the offchannel mlink with plain kfree() after rcu_assign_pointer(NULL). However, rcu_assign_pointer only prevents future RCU readers from obtaining the pointer -- it does not wait for existing readers that already hold it via rcu_dereference.
The TX datapath (e.g. mt7996_mac_write_txwi) dereferences mlink->wcid and mlink->idx under rcu_read_lock. If a TX softirq obtained the pointer via rcu_dereference just before the NULL assignment, it will dereference freed memory after the kfree.
struct mt76_vif_link already contains an rcu_head field that is unused at this free site -- a developer oversight, since the adjacent kfree_rcu_mightsleep call for rx_sc in the same function shows the pattern was understood.
Replace kfree(mlink) with kfree_rcu(mlink, rcu_head).
The Linux kernel CVE team has assigned CVE-2026-74325 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.14 with commit a8f424c1287cc79a06c21816658feea87dfcb83f and fixed in 6.18.40 with commit c7a83899203ed36696a2d35ddd03c0f522874a63 Issue introduced in 6.14 with commit a8f424c1287cc79a06c21816658feea87dfcb83f and fixed in 7.1.5 with commit 50e700ac0edce72dee5c3a9755865d9423696ac7 Issue introduced in 6.14 with commit a8f424c1287cc79a06c21816658feea87dfcb83f and fixed in 7.2-rc1 with commit 7fae097aa9a56c30febf539d72ef3773165d3aa3
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-74325
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:
drivers/net/wireless/mediatek/mt76/channel.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/c7a83899203ed36696a2d35ddd03c0f522874a63 https://git.kernel.org/stable/c/50e700ac0edce72dee5c3a9755865d9423696ac7 https://git.kernel.org/stable/c/7fae097aa9a56c30febf539d72ef3773165d3aa3