linux-stable/net/atm
Cong Wang 54d019cd33 atm: fix a memory leak of vcc->user_back
[ Upstream commit 8d9f73c0ad ]

In lec_arp_clear_vccs() only entry->vcc is freed, but vcc
could be installed on entry->recv_vcc too in lec_vcc_added().

This fixes the following memory leak:

unreferenced object 0xffff8880d9266b90 (size 16):
  comm "atm2", pid 425, jiffies 4294907980 (age 23.488s)
  hex dump (first 16 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 6b 6b 6b a5  ............kkk.
  backtrace:
    [<(____ptrval____)>] kmem_cache_alloc_trace+0x10e/0x151
    [<(____ptrval____)>] lane_ioctl+0x4b3/0x569
    [<(____ptrval____)>] do_vcc_ioctl+0x1ea/0x236
    [<(____ptrval____)>] svc_ioctl+0x17d/0x198
    [<(____ptrval____)>] sock_do_ioctl+0x47/0x12f
    [<(____ptrval____)>] sock_ioctl+0x2f9/0x322
    [<(____ptrval____)>] vfs_ioctl+0x1e/0x2b
    [<(____ptrval____)>] ksys_ioctl+0x61/0x80
    [<(____ptrval____)>] __x64_sys_ioctl+0x16/0x19
    [<(____ptrval____)>] do_syscall_64+0x57/0x65
    [<(____ptrval____)>] entry_SYSCALL_64_after_hwframe+0x49/0xb3

Cc: Gengming Liu <l.dmxcsnsbh@gmail.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-01 20:40:12 +02:00
..
addr.c
addr.h
atm_misc.c
atm_sysfs.c
br2684.c br2684: Remove unnecessary formatting macros b1 and bs 2015-07-31 15:25:52 -07:00
clip.c net: add dev arg to ndo_neigh_construct/destroy 2016-07-05 09:06:28 -07:00
common.c net: Generalise wq_has_sleeper helper 2015-11-30 14:47:33 -05:00
common.h net: Pass kern from net_proto_family.create to sk_alloc 2015-05-11 10:50:17 -04:00
ioctl.c
Kconfig
lec.c atm: fix a memory leak of vcc->user_back 2020-10-01 20:40:12 +02:00
lec.h
lec_arpc.h
Makefile
mpc.c net: atm: remove redundant null pointer check on dev->name 2016-08-18 21:03:48 -07:00
mpc.h net: atm: constify in_cache_ops and eg_cache_ops structures 2015-11-23 15:49:29 -05:00
mpoa_caches.c net: atm: constify in_cache_ops and eg_cache_ops structures 2015-11-23 15:49:29 -05:00
mpoa_caches.h
mpoa_proc.c treewide: Fix typo in printk messages 2015-03-06 23:04:40 +01:00
pppoatm.c arch: Mass conversion of smp_mb__*() 2014-04-18 14:20:48 +02:00
proc.c
protocols.h
pvc.c net: Pass kern from net_proto_family.create to sk_alloc 2015-05-11 10:50:17 -04:00
raw.c net: Fix use after free by removing length arg from sk_data_ready callbacks. 2014-04-11 16:15:36 -04:00
resources.c
resources.h
signaling.c net/atm: sk_err_soft must be positive 2016-05-23 13:51:10 -07:00
signaling.h
svc.c net/atm: sk_err_soft must be positive 2016-05-23 13:51:10 -07:00