android_kernel_samsung_a7y1.../net/wireless
Miaoqing Pan 9430447670 nl80211: fix null pointer dereference
[ Upstream commit b501426cf86e70649c983c52f4c823b3c40d72a3 ]

If the interface is not in MESH mode, the command 'iw wlanx mpath del'
will cause kernel panic.

The root cause is null pointer access in mpp_flush_by_proxy(), as the
pointer 'sdata->u.mesh.mpp_paths' is NULL for non MESH interface.

Unable to handle kernel NULL pointer dereference at virtual address 00000068
[...]
PC is at _raw_spin_lock_bh+0x20/0x5c
LR is at mesh_path_del+0x1c/0x17c [mac80211]
[...]
Process iw (pid: 4537, stack limit = 0xd83e0238)
[...]
[<c021211c>] (_raw_spin_lock_bh) from [<bf8c7648>] (mesh_path_del+0x1c/0x17c [mac80211])
[<bf8c7648>] (mesh_path_del [mac80211]) from [<bf6cdb7c>] (extack_doit+0x20/0x68 [compat])
[<bf6cdb7c>] (extack_doit [compat]) from [<c05c309c>] (genl_rcv_msg+0x274/0x30c)
[<c05c309c>] (genl_rcv_msg) from [<c05c25d8>] (netlink_rcv_skb+0x58/0xac)
[<c05c25d8>] (netlink_rcv_skb) from [<c05c2e14>] (genl_rcv+0x20/0x34)
[<c05c2e14>] (genl_rcv) from [<c05c1f90>] (netlink_unicast+0x11c/0x204)
[<c05c1f90>] (netlink_unicast) from [<c05c2420>] (netlink_sendmsg+0x30c/0x370)
[<c05c2420>] (netlink_sendmsg) from [<c05886d0>] (sock_sendmsg+0x70/0x84)
[<c05886d0>] (sock_sendmsg) from [<c0589f4c>] (___sys_sendmsg.part.3+0x188/0x228)
[<c0589f4c>] (___sys_sendmsg.part.3) from [<c058add4>] (__sys_sendmsg+0x4c/0x70)
[<c058add4>] (__sys_sendmsg) from [<c0208c80>] (ret_fast_syscall+0x0/0x44)
Code: e2822c02 e2822001 e5832004 f590f000 (e1902f9f)
---[ end trace bbd717600f8f884d ]---

Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
Link: https://lore.kernel.org/r/1569485810-761-1-git-send-email-miaoqing@codeaurora.org
[trim useless data from commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-07 09:24:08 +02:00
..
ap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
chan.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
core.c cfg80211: fix memory leak of wiphy device name 2020-04-06 19:16:58 +02:00
core.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
db.txt A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
debugfs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
debugfs.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ethtool.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
genregdb.awk A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ibss.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lib80211_crypt_ccmp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lib80211_crypt_tkip.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lib80211_crypt_wep.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lib80211.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mesh.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mlme.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nl80211.c nl80211: fix null pointer dereference 2020-04-07 09:24:08 +02:00
nl80211.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ocb.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
radiotap.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rdev-ops.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
reg.c cfg80211: initialize on-stack chandefs 2020-04-07 08:07:52 +02:00
reg.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
regdb.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
scan.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sme.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sysfs.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sysfs.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trace.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
util.c cfg80211: Purge frame registrations on iftype change 2020-04-07 07:40:43 +02:00
wext-compat.c cfg80211: initialize on-stack chandefs 2020-04-07 08:07:52 +02:00
wext-compat.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
wext-core.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
wext-priv.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
wext-proc.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
wext-sme.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
wext-spy.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30