nl80211: Fix possible Spectre-v1 for NL80211_TXRATE_HT
authorMasashi Honma <masashi.honma@gmail.com>
Tue, 25 Sep 2018 02:15:00 +0000 (11:15 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 Nov 2018 13:52:38 +0000 (14:52 +0100)
commitc7b66583c9edb63ab7613a6ff545367175f95125
treedbd879657bb310d2aff1cd8d907ca6200df3d5a8
parentfa1578ec411d8cf9724166738fd41fc5b686e28e
nl80211: Fix possible Spectre-v1 for NL80211_TXRATE_HT

[ Upstream commit 30fe6d50eb088783c8729c7d930f65296b2b3fa7 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/wireless/nl80211.c