Jouni Hogander
e979aaf213
slcan: Fix memory leak in error path
...
commit ed50e1600b
upstream.
This patch is fixing memory leak reported by Syzkaller:
BUG: memory leak unreferenced object 0xffff888067f65500 (size 4096):
comm "syz-executor043", pid 454, jiffies 4294759719 (age 11.930s)
hex dump (first 32 bytes):
73 6c 63 61 6e 30 00 00 00 00 00 00 00 00 00 00 slcan0..........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<00000000a06eec0d>] __kmalloc+0x18b/0x2c0
[<0000000083306e66>] kvmalloc_node+0x3a/0xc0
[<000000006ac27f87>] alloc_netdev_mqs+0x17a/0x1080
[<0000000061a996c9>] slcan_open+0x3ae/0x9a0
[<000000001226f0f9>] tty_ldisc_open.isra.1+0x76/0xc0
[<0000000019289631>] tty_set_ldisc+0x28c/0x5f0
[<000000004de5a617>] tty_ioctl+0x48d/0x1590
[<00000000daef496f>] do_vfs_ioctl+0x1c7/0x1510
[<0000000059068dbc>] ksys_ioctl+0x99/0xb0
[<000000009a6eb334>] __x64_sys_ioctl+0x78/0xb0
[<0000000053d0332e>] do_syscall_64+0x16f/0x580
[<0000000021b83b99>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[<000000008ea75434>] 0xffffffffffffffff
Cc: Wolfgang Grandegger <wg@grandegger.com >
Cc: Marc Kleine-Budde <mkl@pengutronix.de >
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com >
Signed-off-by: Jouni Hogander <jouni.hogander@unikie.com >
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de >
Cc: Oliver Hartkopp <socketcan@hartkopp.net >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2019-11-20 18:00:54 +01:00
..
2019-11-12 19:18:11 +01:00
2018-03-28 18:24:45 +02:00
2018-03-28 18:24:44 +02:00
2019-07-21 09:04:22 +02:00
2018-09-05 09:26:28 +02:00
2018-07-28 07:55:45 +02:00
2019-08-16 10:13:50 +02:00
2019-08-29 08:26:39 +02:00
2017-11-02 11:10:55 +01:00
2019-10-11 18:18:31 +02:00
2019-11-12 19:18:14 +01:00
2017-07-18 12:04:56 -07:00
2019-08-29 08:26:38 +02:00
2019-11-12 19:18:46 +01:00
2016-10-24 08:12:35 -02:00
2017-07-18 12:04:56 -07:00
2017-04-25 09:04:30 +02:00
2017-11-02 11:10:55 +01:00
2019-11-12 19:18:12 +01:00
2019-11-20 18:00:54 +01:00
2017-11-10 09:15:28 +01:00
2017-12-14 09:52:46 +01:00
2017-06-09 14:39:02 +02:00
2018-01-17 09:45:17 +01:00
2018-07-28 07:55:45 +02:00