wifi: mac80211: defer link RX stats percpu free to RCU
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c71420db653aba30a234d1e4cf86dde376e604fa · < aa2eb62525188269cdd402a583b9a8ed94657ff0| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: mac80211: defer link RX stats percpu free to RCU
sta_remove_link() frees a removed MLO link's RX stats percpu buffer right away, but defers only the link container to RCU:
sta_info_free_link(&alloc->info); kfree_rcu(alloc, rcu_head);
The RX fast path reads link_sta under rcu_read_lock and writes the percpu stats. A reader that resolved link_sta before the removal keeps the pointer. The container stays alive from the kfree_rcu, so the read still works. But the percpu block it points to is already freed. This needs uses_rss. That is when pcpu_rx_stats exists.
The full STA teardown frees the deflink stats only after synchronize_net(). The link removal path had no such barrier. The race is hard to win in practice, but the free should still wait for RCU.
Free the link together with its data from a single RCU callback, so the percpu block is reclaimed only after readers drain.
From the CVE record · Linux
The Linux kernel’s mac80211 code can free an MLO link’s per-CPU RX stats while an RCU reader still uses them, causing a use-after-free. This race requires the link to have RX stats allocated; the input does not specify an attacker path, authentication requirements, or user interaction.
Anyone running a Linux kernel with mac80211 should check their version against the vendor advisory; affected versions are not specified.