Commit e4bd4459 authored by Nguyen Dinh Phi's avatar Nguyen Dinh Phi Committed by Yongqiang Liu
Browse files

cfg80211: call cfg80211_stop_ap when switch from P2P_GO type

stable inclusion
from stable-v4.9.291
commit 0738cdb636c21ab552eaecf905efa4a6070e3ebc
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9FNG2
CVE: CVE-2021-47194

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0738cdb636c21ab552eaecf905efa4a6070e3ebc



--------------------------------

commit 563fbefe upstream.

If the userspace tools switch from NL80211_IFTYPE_P2P_GO to
NL80211_IFTYPE_ADHOC via send_msg(NL80211_CMD_SET_INTERFACE), it
does not call the cleanup cfg80211_stop_ap(), this leads to the
initialization of in-use data. For example, this path re-init the
sdata->assigned_chanctx_list while it is still an element of
assigned_vifs list, and makes that linked list corrupt.

Signed-off-by: default avatarNguyen Dinh Phi <phind.uet@gmail.com>
Reported-by: default avatar <syzbot+bbf402b783eeb6d908db@syzkaller.appspotmail.com>
Link: https://lore.kernel.org/r/20211027173722.777287-1-phind.uet@gmail.com


Cc: stable@vger.kernel.org
Fixes: ac800140 ("cfg80211: .stop_ap when interface is going down")
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent b152f5a5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment