mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7996: drop fragments with multicast or broadcast RA
IEEE 802.11 fragmentation can only be applied to unicast frames. Therefore, drop fragments with multicast or broadcast RA. This patch addresses vulnerabilities such as CVE-2020-26145. Signed-off-by: Benjamin Lin <[email protected]> Signed-off-by: Shayne Chen <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
3bda39f146
commit
7d30840e5b
@@ -647,6 +647,14 @@ mt7996_mac_fill_rx(struct mt7996_dev *dev, enum mt76_rxq_id q,
|
||||
status->last_amsdu = amsdu_info == MT_RXD4_LAST_AMSDU_FRAME;
|
||||
}
|
||||
|
||||
/* IEEE 802.11 fragmentation can only be applied to unicast frames.
|
||||
* Hence, drop fragments with multicast/broadcast RA.
|
||||
* This check fixes vulnerabilities, like CVE-2020-26145.
|
||||
*/
|
||||
if ((ieee80211_has_morefrags(fc) || seq_ctrl & IEEE80211_SCTL_FRAG) &&
|
||||
FIELD_GET(MT_RXD3_NORMAL_ADDR_TYPE, rxd3) != MT_RXD3_NORMAL_U2M)
|
||||
return -EINVAL;
|
||||
|
||||
hdr_gap = (u8 *)rxd - skb->data + 2 * remove_pad;
|
||||
if (hdr_trans && ieee80211_has_morefrags(fc)) {
|
||||
if (mt7996_reverse_frag0_hdr_trans(skb, hdr_gap))
|
||||
|
||||
Reference in New Issue
Block a user