projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bcbf65
)
nl80211: Fix possible Spectre-v1 for NL80211_TXRATE_HT
author
Masashi Honma
<masashi.honma@gmail.com>
Tue, 25 Sep 2018 02:15:00 +0000
(11:15 +0900)
committer
Johannes Berg
<johannes.berg@intel.com>
Wed, 26 Sep 2018 09:17:32 +0000
(11:17 +0200)
Use array_index_nospec() to sanitize ridx with respect to speculation.
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c
patch
|
blob
|
history
diff --git
a/net/wireless/nl80211.c
b/net/wireless/nl80211.c
index 4b8ec659e797ff743267773e315c6220b90993d0..bd26230de63ef96e2b74bd73a4a181b007d4d5b2 100644
(file)
--- a/
net/wireless/nl80211.c
+++ b/
net/wireless/nl80211.c
@@
-3756,6
+3756,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