]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211_hwsim: fix use-after-free bug in hwsim_exit_net
authorBenjamin Beichler <benjamin.beichler@uni-rostock.de>
Wed, 7 Mar 2018 17:11:07 +0000 (18:11 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 21 Mar 2018 09:57:33 +0000 (10:57 +0100)
commit79a6abd13fc0b6f70a8563c737bd78841e148c50
tree3a4a59d732bbf4e7d34fc90af03b2c66462f34bb
parente976ce57ac2af9672f1335ab39e6b7703bdaecf9
mac80211_hwsim: fix use-after-free bug in hwsim_exit_net

When destroying a net namespace, all hwsim interfaces, which are not
created in default namespace are deleted. But the async deletion of the
interfaces could last longer than the actual destruction of the
namespace, which results to an use after free bug. Therefore use
synchronous deletion in this case.

Fixes: 0547438d250a ("mac80211_hwsim: Allow managing radios from non-initial namespaces")
Reported-by: syzbot+70ce058e01259de7bb1d@syzkaller.appspotmail.com
Signed-off-by: Benjamin Beichler <benjamin.beichler@uni-rostock.de>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c