]> www.infradead.org Git - users/dwmw2/linux.git/commit
mac80211_hwsim: Fix possible Spectre-v1 for hwsim_world_regdom_custom
authorJinbum Park <jinb.park7@gmail.com>
Tue, 31 Jul 2018 14:10:40 +0000 (23:10 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Oct 2018 06:55:52 +0000 (08:55 +0200)
commit03950ebc945ca242c5c970237a1780402a1b9c74
tree25ba6d95b3ad571c74b089341e13abb4adac8abb
parentbfcb6097e5f326bc867670528087419c8bab0fbf
mac80211_hwsim: Fix possible Spectre-v1 for hwsim_world_regdom_custom

[ Upstream commit 3a2af7cccbbaf2362db9053a946a6084e12bfa73 ]

User controls @idx which to be used as index of hwsim_world_regdom_custom.
So, It can be exploited via Spectre-like attack. (speculative execution)

This kind of attack leaks address of hwsim_world_regdom_custom,
It leads an attacker to bypass security mechanism such as KASLR.

So sanitize @idx before using it to prevent attack.

I leveraged strategy [1] to find and exploit this gadget.

[1] https://github.com/jinb-park/linux-exploit/tree/master/exploit-remaining-spectre-gadget/

Signed-off-by: Jinbum Park <jinb.park7@gmail.com>
[johannes: unwrap URL]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/mac80211_hwsim.c