linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] nl80211: Fix possible Spectre-v1 for NL80211_TXRATE_HT
@ 2018-09-25  2:15 Masashi Honma
  2018-09-25  2:15 ` [PATCH 2/2] nl80211: Fix possible Spectre-v1 for CQM RSSI thresholds Masashi Honma
  0 siblings, 1 reply; 5+ messages in thread
From: Masashi Honma @ 2018-09-25  2:15 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Masashi Honma

Use array_index_nospec() to sanitize ridx with respect to speculation.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
---
 net/wireless/nl80211.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 0827cbd..3c469c1 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3748,6 +3748,7 @@ static bool ht_rateset_to_mask(struct ieee80211_supported_band *sband,
 			return false;
 
 		/* check availability */
+		ridx = array_index_nospec(ridx, IEEE80211_HT_MCS_MASK_LEN);
 		if (sband->ht_cap.mcs.rx_mask[ridx] & rbit)
 			mcs[ridx] |= rbit;
 		else
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-27  9:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-25  2:15 [PATCH 1/2] nl80211: Fix possible Spectre-v1 for NL80211_TXRATE_HT Masashi Honma
2018-09-25  2:15 ` [PATCH 2/2] nl80211: Fix possible Spectre-v1 for CQM RSSI thresholds Masashi Honma
2018-09-26  9:23   ` Johannes Berg
2018-09-26 22:26     ` Masashi Honma
2018-09-27  9:43       ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).