CVE-2026-99771: wifi: mac80211: reload TDLS header pointer after skb_linearize()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
wifi: mac80211: reload TDLS header pointer after skb_linearize()
ieee80211_process_tdls_channel_switch() sets tf = skb->data before it calls skb_linearize(), and reads tf->action_code afterwards.
ieee80211_rx_h_data() queues TDLS channel switch requests and responses to the interface after pulling only offsetof(struct ieee80211_tdls_data, u) bytes, so the skb can still be non-linear when the interface work handles it. Drivers that build paged RX skbs do this for every frame that does not fit into the skb head, e.g. iwlwifi (mvm), which is also the only mac80211 driver that sets NL80211_FEATURE_TDLS_CHANNEL_SWITCH. If the remaining data does not fit into the tailroom, skb_linearize() moves the data to a new head and frees the old one, and the action code is then read from freed memory. Depending on what that memory holds by then, the frame is handled as before or ends in the WARN_ON_ONCE() of the default case.
The frame only has to be a data frame with the TDLS ethertype from an authorized peer, e.g. relayed by the AP from another station in the BSS; the read happens before the sender is checked to be a TDLS peer.
Load tf after skb_linearize(), as the request and response handlers already do.
Found by static analysis tool CodeQL.
The Linux kernel CVE team has assigned CVE-2026-99771 to this issue.
Affected and fixed versions
===========================
Issue introduced in 3.19 with commit 8a4d32f30d11d6d8cc29594c7a36b9be6b0edbb5 and fixed in 6.12.118 with commit 25af938d604fa729e0d5292b4f56bc81aa8d0d25 Issue introduced in 3.19 with commit 8a4d32f30d11d6d8cc29594c7a36b9be6b0edbb5 and fixed in 6.18.64 with commit 16e23c766ecd9f378e09d29ac2ff59c88a656da5 Issue introduced in 3.19 with commit 8a4d32f30d11d6d8cc29594c7a36b9be6b0edbb5 and fixed in 7.3.5 with commit 5251ad1a6caa35e6d8378aadb909d3f0a675f321 Issue introduced in 3.19 with commit 8a4d32f30d11d6d8cc29594c7a36b9be6b0edbb5 and fixed in 7.4-rc2 with commit 35c5a5ea4418571997a7e7af3e7e8922b136f6e6
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-99771
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/mac80211/tdls.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/25af938d604fa729e0d5292b4f56bc81aa8d0d25 https://git.kernel.org/stable/c/16e23c766ecd9f378e09d29ac2ff59c88a656da5 https://git.kernel.org/stable/c/5251ad1a6caa35e6d8378aadb909d3f0a675f321 https://git.kernel.org/stable/c/35c5a5ea4418571997a7e7af3e7e8922b136f6e6