Skip to content

Commit 40e7462

Browse files
Wen Gongjmberg-intel
authored andcommitted
ath10k: drop fragments with multicast DA for SDIO
Fragmentation is not used with multicast frames. Discard unexpected fragments with multicast DA. This fixes CVE-2020-26145. Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049 Cc: [email protected] Signed-off-by: Wen Gong <[email protected]> Signed-off-by: Jouni Malinen <[email protected]> Link: https://lore.kernel.org/r/20210511200110.9ca6ca7945a9.I1e18b514590af17c155bda86699bc3a971a8dcf4@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 65c415a commit 40e7462

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/net/wireless/ath/ath10k/htt_rx.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2617,15 +2617,20 @@ static bool ath10k_htt_rx_proc_rx_frag_ind_hl(struct ath10k_htt *htt,
26172617
rx_desc = (struct htt_hl_rx_desc *)(skb->data + tot_hdr_len);
26182618
rx_desc_info = __le32_to_cpu(rx_desc->info);
26192619

2620+
hdr = (struct ieee80211_hdr *)((u8 *)rx_desc + rx_hl->fw_desc.len);
2621+
2622+
if (is_multicast_ether_addr(hdr->addr1)) {
2623+
/* Discard the fragment with multicast DA */
2624+
goto err;
2625+
}
2626+
26202627
if (!MS(rx_desc_info, HTT_RX_DESC_HL_INFO_ENCRYPTED)) {
26212628
spin_unlock_bh(&ar->data_lock);
26222629
return ath10k_htt_rx_proc_rx_ind_hl(htt, &resp->rx_ind_hl, skb,
26232630
HTT_RX_NON_PN_CHECK,
26242631
HTT_RX_NON_TKIP_MIC);
26252632
}
26262633

2627-
hdr = (struct ieee80211_hdr *)((u8 *)rx_desc + rx_hl->fw_desc.len);
2628-
26292634
if (ieee80211_has_retry(hdr->frame_control))
26302635
goto err;
26312636

0 commit comments

Comments
 (0)