]> git.baikalelectronics.ru Git - kernel.git/commit
nl80211: Fix possible Spectre-v1 for CQM RSSI thresholds
authorMasashi Honma <masashi.honma@gmail.com>
Tue, 25 Sep 2018 02:15:01 +0000 (11:15 +0900)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 27 Sep 2018 09:44:44 +0000 (11:44 +0200)
commitf8571eff1701e95a1c54217710f897b301885770
tree996fc5f62a229ad0d726fa868eecf21cc4ff7ba9
parent19e138a2da41b171900511313a86974dd3599c70
nl80211: Fix possible Spectre-v1 for CQM RSSI thresholds

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

Note that the user doesn't control i directly, but can make it out
of bounds by not finding a threshold in the array.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
[add note about user control, as explained by Masashi]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/nl80211.c