android_kernel_samsung_a7y1.../net
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
..
6lowpan
9p 9p/virtio: Add cleanup path in p9_virtio_init 2020-04-06 20:04:29 +02:00
802
8021q vlan: disable SIOCSHWTSTAMP in container 2020-04-06 17:01:37 +02:00
appletalk appletalk: enforce CAP_NET_RAW for raw sockets 2020-04-07 07:37:30 +02:00
atm
ax25 ax25: enforce CAP_NET_RAW for raw sockets 2020-04-07 07:37:32 +02:00
batman-adv batman-adv: fix for leaked TVLV handler. 2020-04-06 19:54:11 +02:00
bluetooth Revert "Bluetooth: validate BLE connection interval updates" 2020-04-07 07:35:58 +02:00
bridge bridge/mdb: remove wrong use of NLM_F_MULTI 2020-04-06 21:35:09 +02:00
caif
can can: purge socket error queue on sock destruct 2020-04-06 19:16:48 +02:00
ceph
core net: Fix null de-reference of device refcount 2020-04-06 21:35:17 +02:00
dcb
dccp
decnet
dns_resolver
dsa
ethernet
hsr
ieee802154 ieee802154: enforce CAP_NET_RAW for raw sockets 2020-04-07 07:37:35 +02:00
ipv4 net: ipv4: avoid mixed n_redirects and rate_tokens usage 2020-04-07 08:07:08 +02:00
ipv6 ipv6: drop incoming packets having a v4mapped source address 2020-04-07 08:07:05 +02:00
ipx
irda
iucv
key xfrm: clean up xfrm protocol checks 2020-04-06 21:34:53 +02:00
l2tp compat_ioctl: pppoe: fix PPPOEIOCSFWD handling 2020-04-06 20:28:29 +02:00
l3mdev
lapb lapb: fixed leak of control-blocks. 2020-04-06 19:03:42 +02:00
llc llc: fix skb leak in llc_build_and_send_ui_pkt() 2020-04-06 18:20:39 +02:00
mac80211 mac80211: handle deauthentication/disassociation from TDLS peer 2020-04-07 07:36:45 +02:00
mac802154
mpls
mptcp
ncm
netfilter netfilter: nf_conntrack_ftp: Fix debug output 2020-04-06 21:36:46 +02:00
netlabel
netlink
netrom netrom: hold sock when setting skb->destructor 2020-04-06 20:05:22 +02:00
nfc NFC: fix attrs checks in netlink interface 2020-04-07 08:07:28 +02:00
openvswitch openvswitch: change type of UPCALL_PID attribute to NLA_UNSPEC 2020-04-07 07:37:13 +02:00
packet af_packet: tone down the Tx-ring unsupported spew. 2020-04-06 21:35:03 +02:00
phonet
rds net/rds: Fix error handling in rds_ib_add_one() 2020-04-07 08:07:20 +02:00
rfkill
rose
rxrpc
sched sch_cbq: validate TCA_CBQ_WRROPT to avoid crash 2020-04-07 08:07:22 +02:00
sctp sctp: use transport pf_retrans in sctp_do_8_2_transport_strike 2020-04-06 21:35:23 +02:00
sunrpc sunrpc: don't mark uninitialised items as VALID. 2020-04-06 16:38:50 +02:00
switchdev
tipc tipc: add NULL pointer check before calling kfree_rcu 2020-04-06 21:35:27 +02:00
unix
vmw_vsock
wimax
wireless nl80211: fix null pointer dereference 2020-04-07 09:24:08 +02:00
x25
xfrm xfrm: clean up xfrm protocol checks 2020-04-06 21:34:53 +02:00
compat.c
Kconfig
Makefile
socket.c
sysctl_net.c