diff options
author | Masashi Honma <masashi.honma@gmail.com> | 2018-09-25 04:15:00 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-09-26 11:17:32 +0200 |
commit | 30fe6d50eb088783c8729c7d930f65296b2b3fa7 (patch) | |
tree | 1755afa4e983239ef5128b4683daea13efb49100 /net/wireless | |
parent | cfg80211: fix reg_query_regdb_wmm kernel-doc (diff) | |
download | linux-30fe6d50eb088783c8729c7d930f65296b2b3fa7.tar.xz linux-30fe6d50eb088783c8729c7d930f65296b2b3fa7.zip |
nl80211: Fix possible Spectre-v1 for NL80211_TXRATE_HT
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>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 4b8ec659e797..bd26230de63e 100644 --- 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 |