wifi: mt76: Fix memory leak after mt76_connac_mcu_alloc_sta_req()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6683d988089ce0e80bd859a9493333b6b272420e · < c41075ce8cf05ed8c0e7b7efef000dce548ffc42| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
wifi: mt76: Fix memory leak after mt76_connac_mcu_alloc_sta_req()
mt76_connac_mcu_alloc_sta_req() allocates an skb which is expected to be freed eventually by mt76_mcu_skb_send_msg(). However, currently if an intermediate function fails before sending, the allocated skb is leaked.
Specifically, mt76_connac_mcu_sta_wed_update() and mt76_connac_mcu_sta_key_tlv() may fail, leading to an immediate memory leak in the error path.
Fix this by explicitly freeing the skb in these error paths. Commit 7c0f63fe37a5 ("wifi: mt76: mt7996: fix memory leak on mt7996_mcu_sta_key_tlv error") made a similar change.
Compile tested only. Issue found using a prototype static analysis tool and code review.
From the CVE record · Linux
The Linux kernel’s mt76 Wi-Fi code can leak an allocated buffer if certain functions fail before it is sent. The report does not establish how an attacker could trigger the failure or specify access or user-interaction requirements. The issue was found through static analysis and code review; the fix was compile-tested only.
Engineers running Linux kernels with the mt76 Wi-Fi code should check their affected versions; none are specified in the input.