linux/net/atm
Cong Wang 93a2014afb atm: fix a UAF in lec_arp_clear_vccs()
Gengming reported a UAF in lec_arp_clear_vccs(),
where we add a vcc socket to an entry in a per-device
list but free the socket without removing it from the
list when vcc->dev is NULL.

We need to call lec_vcc_close() to search and remove
those entries contain the vcc being destroyed. This can
be done by calling vcc->push(vcc, NULL) unconditionally
in vcc_destroy_socket().

Another issue discovered by Gengming's reproducer is
the vcc->dev may point to the static device lecatm_dev,
for which we don't need to register/unregister device,
so we can just check for vcc->dev->ops->owner.

Reported-by: Gengming Liu <l.dmxcsnsbh@gmail.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-04 11:59:20 -07: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: atm: use %*ph to print small buffer 2020-01-25 10:14:40 +01: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 atm: fix a UAF in lec_arp_clear_vccs() 2020-05-04 11:59:20 -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
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02: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
lec.c net: atm: use %*ph to print small buffer 2020-01-25 10:14:40 +01: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
Makefile 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 proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
pppoatm.c pppoatm: use %*ph to print small buffer 2019-09-05 12:33:28 +02:00
proc.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00: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 net: use helpers to change sk_ack_backlog 2019-11-06 16:14:48 -08: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: use helpers to change sk_ack_backlog 2019-11-06 16:14:48 -08:00