linux-stable/net/mac80211
Remi Pommarel 6a01afcf84 mac80211: mesh: Free ie data when leaving mesh
At ieee80211_join_mesh() some ie data could have been allocated (see
copy_mesh_setup()) and need to be cleaned up when leaving the mesh.

This fixes the following kmemleak report:

unreferenced object 0xffff0000116bc600 (size 128):
  comm "wpa_supplicant", pid 608, jiffies 4294898983 (age 293.484s)
  hex dump (first 32 bytes):
    30 14 01 00 00 0f ac 04 01 00 00 0f ac 04 01 00  0...............
    00 0f ac 08 00 00 00 00 c4 65 40 00 00 00 00 00  .........e@.....
  backtrace:
    [<00000000bebe439d>] __kmalloc_track_caller+0x1c0/0x330
    [<00000000a349dbe1>] kmemdup+0x28/0x50
    [<0000000075d69baa>] ieee80211_join_mesh+0x6c/0x3b8 [mac80211]
    [<00000000683bb98b>] __cfg80211_join_mesh+0x1e8/0x4f0 [cfg80211]
    [<0000000072cb507f>] nl80211_join_mesh+0x520/0x6b8 [cfg80211]
    [<0000000077e9bcf9>] genl_family_rcv_msg+0x374/0x680
    [<00000000b1bd936d>] genl_rcv_msg+0x78/0x108
    [<0000000022c53788>] netlink_rcv_skb+0xb0/0x1c0
    [<0000000011af8ec9>] genl_rcv+0x34/0x48
    [<0000000069e41f53>] netlink_unicast+0x268/0x2e8
    [<00000000a7517316>] netlink_sendmsg+0x320/0x4c0
    [<0000000069cba205>] ____sys_sendmsg+0x354/0x3a0
    [<00000000e06bab0f>] ___sys_sendmsg+0xd8/0x120
    [<0000000037340728>] __sys_sendmsg+0xa4/0xf8
    [<000000004fed9776>] __arm64_sys_sendmsg+0x44/0x58
    [<000000001c1e5647>] el0_svc_handler+0xd0/0x1a0

Fixes: c80d545da3 (mac80211: Let userspace enable and configure vendor specific path selection.)
Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Link: https://lore.kernel.org/r/20200704135007.27292-1-repk@triplefau.lt
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2020-07-30 10:23:35 +02:00
..
aead_api.c
aead_api.h
aes_ccm.h
aes_cmac.c mac80211: Update BIP to support Beacon frames 2020-02-24 10:36:03 +01:00
aes_cmac.h
aes_gcm.h
aes_gmac.c mac80211: Update BIP to support Beacon frames 2020-02-24 10:36:03 +01:00
aes_gmac.h
agg-rx.c mac80211: accept aggregation sessions on 6 GHz 2020-05-31 11:27:16 +02:00
agg-tx.c mac80211: accept aggregation sessions on 6 GHz 2020-05-31 11:27:16 +02:00
airtime.c
cfg.c mac80211: mesh: Free ie data when leaving mesh 2020-07-30 10:23:35 +02:00
chan.c mac80211: handle channel frequency offset 2020-04-24 12:33:43 +02:00
debug.h
debugfs.c
debugfs.h
debugfs_key.c mac80211: Support BIGTK configuration for Beacon protection 2020-02-24 10:35:57 +01:00
debugfs_key.h mac80211: Support BIGTK configuration for Beacon protection 2020-02-24 10:35:57 +01:00
debugfs_netdev.c mac80211: mlme: remove duplicate AID bookkeeping 2020-04-24 11:46:11 +02:00
debugfs_netdev.h
debugfs_sta.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2020-03-29 21:25:29 -07:00
debugfs_sta.h
driver-ops.c
driver-ops.h mac80211: fix variable names in TID config methods 2020-05-27 10:02:01 +02:00
ethtool.c
fils_aead.c
fils_aead.h
he.c mac80211: use HE 6 GHz band capability and pass it to the driver 2020-05-31 11:27:03 +02:00
ht.c mac80211: Remove support for changing AP SMPS mode 2020-02-07 12:48:29 +01:00
ibss.c mac80211: avoid using ext NSS high BW if not supported 2020-05-31 11:26:50 +02:00
ieee80211_i.h mac80211: Add HE 6GHz capabilities element to probe request 2020-05-31 11:27:05 +02:00
iface.c mac80211: fix drv_config_iface_filter() behaviour 2020-04-24 11:46:17 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
key.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2020-03-29 21:25:29 -07:00
key.h mac80211: Support BIGTK configuration for Beacon protection 2020-02-24 10:35:57 +01:00
led.c
led.h
main.c mac80211: support control port TX status reporting 2020-05-28 09:02:14 +02:00
Makefile
mesh.c mac80211: fix warning in 6 GHz IE addition in mesh mode 2020-07-30 10:20:37 +02:00
mesh.h mac80211: add HE 6 GHz Band Capability element 2020-05-31 11:26:39 +02:00
mesh_hwmp.c mac80211: simplify mesh code 2020-06-25 10:54:09 +02:00
mesh_pathtbl.c
mesh_plink.c mac80211: use HE 6 GHz band capability and pass it to the driver 2020-05-31 11:27:03 +02:00
mesh_ps.c
mesh_sync.c
michael.c
michael.h
mlme.c mac80211: initialize return flags in HE 6 GHz operation parsing 2020-06-05 14:33:51 +02:00
ocb.c
offchannel.c mac80211: handle channel frequency offset 2020-04-24 12:33:43 +02:00
pm.c
rate.c mac80211: populate debugfs only after cfg80211 init 2020-04-24 11:30:13 +02:00
rate.h mac80211: populate debugfs only after cfg80211 init 2020-04-24 11:30:13 +02:00
rc80211_minstrel.c
rc80211_minstrel.h
rc80211_minstrel_debugfs.c
rc80211_minstrel_ht.c One batch of changes, containing: 2020-05-26 20:17:35 -07:00
rc80211_minstrel_ht.h
rc80211_minstrel_ht_debugfs.c
rx.c mac80211: allow rx of mesh eapol frames with default rx key 2020-06-25 12:55:45 +02:00
scan.c mac80211: Add HE 6GHz capabilities element to probe request 2020-05-31 11:27:05 +02:00
spectmgmt.c mac80211: avoid using ext NSS high BW if not supported 2020-05-31 11:26:50 +02:00
sta_info.c mac80211: sta_info: Add lockdep condition for RCU list usage 2020-04-24 11:31:20 +02:00
sta_info.h mac80211: fix two missing documentation entries 2020-04-24 12:40:20 +02:00
status.c mac80211: fix control port tx status check 2020-06-25 10:48:09 +02:00
tdls.c mac80211: support control port TX status reporting 2020-05-28 09:02:14 +02:00
tkip.c
tkip.h
trace.c
trace.h mac80211: handle channel frequency offset 2020-04-24 12:33:43 +02:00
trace_msg.h
tx.c mac80211: skip mpath lookup also for control port tx 2020-06-25 10:59:27 +02:00
util.c mac80211: fix warning in 6 GHz IE addition in mesh mode 2020-07-30 10:20:37 +02:00
vht.c mac80211: implement Operating Mode Notification extended NSS support 2020-04-24 12:33:42 +02:00
wep.c mac80211: make ieee80211_wep_init() return void 2020-02-07 12:40:34 +01:00
wep.h mac80211: make ieee80211_wep_init() return void 2020-02-07 12:40:34 +01:00
wme.c
wme.h
wpa.c
wpa.h