]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 17:44:25 +0000 (13:44 -0400)
commit08c39f3102df9b7e3aff8ae99f618acb36a58172
tree05fd984ad5b64b9af0f1ff862d6bb92262e31927
parentbcb25e19373210c1e202c7910394c982bdcac541
mac80211_hwsim: fix use-after-free bug in hwsim_exit_net

BugLink: http://bugs.launchpad.net/bugs/1774063
commit 8cfd36a0b53aeb4ec21d81eb79706697b84dfc3d upstream.

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: 100cb9ff40e0 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/wireless/mac80211_hwsim.c