linux-brain/net/atm
Cong Wang fa7c336dd1 atm: fix a memory leak of vcc->user_back
[ Upstream commit 8d9f73c0ad2f20e9fed5380de0a3097825859d03 ]

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 13:17:58 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
addr.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
addr.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atm_misc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atm_sysfs.c net: Use octal not symbolic permissions 2018-03-26 12:07:48 -04:00
br2684.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
clip.c net: atm: Reduce the severity of logging in unlink_clip_vcc 2019-11-18 17:08:20 -08:00
common.c net: use skb_queue_empty_lockless() in poll() handlers 2019-10-28 13:33:41 -07:00
common.h Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL 2018-06-28 10:40:47 -07:00
ioctl.c net: rework SIOCGSTAMP ioctl handling 2019-04-19 14:07:40 -07:00
lec.c atm: fix a memory leak of vcc->user_back 2020-10-01 13:17:58 +02:00
lec.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
lec_arpc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mpc.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
mpc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mpoa_caches.c net: mpoa: Use kzfree rather than its implementation. 2019-09-05 12:06:04 +02:00
mpoa_caches.h atm: mpoa: remove 32-bit timekeeping 2017-11-30 09:26:32 -05:00
mpoa_proc.c atm: remove blank lines at EOF 2018-07-24 14:10:42 -07:00
pppoatm.c pppoatm: use %*ph to print small buffer 2019-09-05 12:33:28 +02:00
proc.c vcc_seq_next should increase position index 2020-10-01 13:17:24 +02:00
protocols.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pvc.c net: rework SIOCGSTAMP ioctl handling 2019-04-19 14:07:40 -07:00
raw.c atm: Preserve value of skb->truesize when accounting to vcc 2018-06-17 08:27:01 +09:00
resources.c net: atm: Add another IS_ENABLED(CONFIG_COMPAT) in atm_dev_ioctl 2019-03-07 10:14:50 -08:00
resources.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
signaling.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
signaling.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
svc.c net: rework SIOCGSTAMP ioctl handling 2019-04-19 14:07:40 -07:00