Skip to content

Commit 0dc267b

Browse files
Wen Gongjmberg-intel
authored andcommitted
ath10k: Fix TKIP Michael MIC verification for PCIe
TKIP Michael MIC was not verified properly for PCIe cases since the validation steps in ieee80211_rx_h_michael_mic_verify() in mac80211 did not get fully executed due to unexpected flag values in ieee80211_rx_status. Fix this by setting the flags property to meet mac80211 expectations for performing Michael MIC validation there. This fixes CVE-2020-26141. It does the same as ath10k_htt_rx_proc_rx_ind_hl() for SDIO which passed MIC verification case. This applies only to QCA6174/QCA9377 PCIe. Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1 Cc: [email protected] Signed-off-by: Wen Gong <[email protected]> Signed-off-by: Jouni Malinen <[email protected]> Link: https://lore.kernel.org/r/20210511200110.c3f1d42c6746.I795593fcaae941c471425b8c7d5f7bb185d29142@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 079a108 commit 0dc267b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1974,6 +1974,11 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar,
19741974
}
19751975

19761976
ath10k_htt_rx_h_csum_offload(msdu);
1977+
1978+
if (frag && !fill_crypt_header &&
1979+
enctype == HTT_RX_MPDU_ENCRYPT_TKIP_WPA)
1980+
status->flag &= ~RX_FLAG_MMIC_STRIPPED;
1981+
19771982
ath10k_htt_rx_h_undecap(ar, msdu, status, first_hdr, enctype,
19781983
is_decrypted);
19791984

@@ -1991,6 +1996,11 @@ static void ath10k_htt_rx_h_mpdu(struct ath10k *ar,
19911996

19921997
hdr = (void *)msdu->data;
19931998
hdr->frame_control &= ~__cpu_to_le16(IEEE80211_FCTL_PROTECTED);
1999+
2000+
if (frag && !fill_crypt_header &&
2001+
enctype == HTT_RX_MPDU_ENCRYPT_TKIP_WPA)
2002+
status->flag &= ~RX_FLAG_IV_STRIPPED &
2003+
~RX_FLAG_MMIC_STRIPPED;
19942004
}
19952005
}
19962006

0 commit comments

Comments
 (0)