wifi: mac80211: always free skb on ieee80211_tx_prepare_skb() failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 06be6b149f7e406bcf16098567f5a6c9f042bced · < 06e769dddcbeb3baf2ce346273b53dd61fdbecf4| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: mac80211: always free skb on ieee80211_tx_prepare_skb() failure
ieee80211_tx_prepare_skb() has three error paths, but only two of them free the skb. The first error path (ieee80211_tx_prepare() returning TX_DROP) does not free it, while invoke_tx_handlers() failure and the fragmentation check both do.
Add kfree_skb() to the first error path so all three are consistent, and remove the now-redundant frees in callers (ath9k, mt76, mac80211_hwsim) to avoid double-free.
Document the skb ownership guarantee in the function's kdoc.
From the CVE record · Linux
The mac80211 ieee80211_tx_prepare_skb() function fails to free a network buffer on one error path, causing a memory leak. The input does not specify how an attacker could trigger this path or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with the affected mac80211 code should check their kernel versions; affected versions are not specified.