Karthik Alapati
1bea0bbf66
HID: hidraw: fix memory leak in hidraw_release()
...
commit a5623a203cffe2d2b84d2f6c989d9017db1856af upstream.
Free the buffered reports before deleting the list entry.
BUG: memory leak
unreferenced object 0xffff88810e72f180 (size 32):
comm "softirq", pid 0, jiffies 4294945143 (age 16.080s)
hex dump (first 32 bytes):
64 f3 c6 6a d1 88 07 04 00 00 00 00 00 00 00 00 d..j............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<ffffffff814ac6c3>] kmemdup+0x23/0x50 mm/util.c:128
[<ffffffff8357c1d2>] kmemdup include/linux/fortify-string.h:440 [inline]
[<ffffffff8357c1d2>] hidraw_report_event+0xa2/0x150 drivers/hid/hidraw.c:521
[<ffffffff8356ddad>] hid_report_raw_event+0x27d/0x740 drivers/hid/hid-core.c:1992
[<ffffffff8356e41e>] hid_input_report+0x1ae/0x270 drivers/hid/hid-core.c:2065
[<ffffffff835f0d3f>] hid_irq_in+0x1ff/0x250 drivers/hid/usbhid/hid-core.c:284
[<ffffffff82d3c7f9>] __usb_hcd_giveback_urb+0xf9/0x230 drivers/usb/core/hcd.c:1670
[<ffffffff82d3cc26>] usb_hcd_giveback_urb+0x1b6/0x1d0 drivers/usb/core/hcd.c:1747
[<ffffffff82ef1e14>] dummy_timer+0x8e4/0x14c0 drivers/usb/gadget/udc/dummy_hcd.c:1988
[<ffffffff812f50a8>] call_timer_fn+0x38/0x200 kernel/time/timer.c:1474
[<ffffffff812f5586>] expire_timers kernel/time/timer.c:1519 [inline]
[<ffffffff812f5586>] __run_timers.part.0+0x316/0x430 kernel/time/timer.c:1790
[<ffffffff812f56e4>] __run_timers kernel/time/timer.c:1768 [inline]
[<ffffffff812f56e4>] run_timer_softirq+0x44/0x90 kernel/time/timer.c:1803
[<ffffffff848000e6>] __do_softirq+0xe6/0x2ea kernel/softirq.c:571
[<ffffffff81246db0>] invoke_softirq kernel/softirq.c:445 [inline]
[<ffffffff81246db0>] __irq_exit_rcu kernel/softirq.c:650 [inline]
[<ffffffff81246db0>] irq_exit_rcu+0xc0/0x110 kernel/softirq.c:662
[<ffffffff84574f02>] sysvec_apic_timer_interrupt+0xa2/0xd0 arch/x86/kernel/apic/apic.c:1106
[<ffffffff84600c8b>] asm_sysvec_apic_timer_interrupt+0x1b/0x20 arch/x86/include/asm/idtentry.h:649
[<ffffffff8458a070>] native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
[<ffffffff8458a070>] arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
[<ffffffff8458a070>] acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline]
[<ffffffff8458a070>] acpi_idle_do_entry+0xc0/0xd0 drivers/acpi/processor_idle.c:554
Link: https://syzkaller.appspot.com/bug?id=19a04b43c75ed1092021010419b5e560a8172c4f
Reported-by: syzbot+f59100a0428e6ded9443@syzkaller.appspotmail.com
Signed-off-by: Karthik Alapati <mail@karthek.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-05 10:23:57 +02:00
..
2022-04-20 09:06:34 +02:00
2019-12-05 15:34:28 +01:00
2021-12-14 10:04:46 +01:00
2019-09-06 10:19:33 +02:00
2021-04-28 12:07:16 +02:00
2022-01-27 08:47:36 +01:00
2015-11-05 09:51:50 -08:00
2016-04-04 09:59:21 +02:00
2015-10-21 13:15:53 +02:00
2019-11-06 12:18:20 +01:00
2021-10-06 10:23:42 +02:00
2021-12-14 10:04:47 +01:00
2016-03-02 10:31:36 +01:00
2021-06-30 08:49:10 -04:00
2021-12-14 10:04:47 +01:00
2017-12-20 10:07:26 +01:00
2020-12-02 08:31:25 +01:00
2022-03-08 19:00:59 +01:00
2019-11-06 12:18:20 +01:00
2015-10-21 13:15:53 +02:00
2021-12-14 10:04:47 +01:00
2019-11-06 12:18:20 +01:00
2019-11-06 12:18:20 +01:00
2015-08-18 15:03:43 +02:00
2015-11-05 10:15:35 -08:00
2021-06-30 08:49:11 -04:00
2021-12-14 10:04:47 +01:00
2021-12-29 12:14:48 +01:00
2019-11-06 12:18:20 +01:00
2015-01-26 14:25:41 +01:00
2021-05-22 10:40:26 +02:00
2022-03-08 19:00:59 +01:00
2016-09-19 14:32:22 +02:00
2022-06-14 16:52:31 +02:00
2019-02-12 19:44:59 +01:00
2019-11-06 12:18:20 +01:00
2019-11-06 12:18:20 +01:00
2019-11-06 12:18:20 +01:00
2016-09-26 15:39:54 +02:00
2021-12-14 10:04:47 +01:00
2015-02-18 21:14:54 +01:00
2019-11-06 12:18:20 +01:00
2014-12-17 08:50:12 +01:00
2019-11-06 12:18:20 +01:00
2020-07-22 09:10:51 +02:00
2017-04-12 12:41:16 +02:00
2020-09-12 11:47:31 +02:00
2018-10-03 17:01:47 -07:00
2016-03-10 17:17:26 +01:00
2015-06-29 14:51:12 +02:00
2015-06-29 14:51:12 +02:00
2015-06-29 14:51:12 +02:00
2015-12-28 13:41:44 +01:00
2021-05-22 10:40:26 +02:00
2021-12-14 10:04:47 +01:00
2018-04-24 09:34:11 +02:00
2021-12-14 10:04:47 +01:00
2015-12-28 13:41:51 +01:00
2021-12-14 10:04:47 +01:00
2021-12-14 10:04:47 +01:00
2021-12-14 10:04:47 +01:00
2021-12-14 10:04:47 +01:00
2021-12-14 10:04:47 +01:00
2021-12-14 10:04:47 +01:00
2021-12-14 10:04:47 +01:00
2021-12-14 10:04:47 +01:00
2021-12-14 10:04:47 +01:00
2016-04-04 09:49:12 +02:00
2018-10-10 08:53:20 +02:00
2021-12-14 10:04:47 +01:00
2016-11-05 16:56:09 +01:00
2021-06-30 08:49:10 -04:00
2015-05-07 10:47:53 +02:00
2019-11-06 12:18:20 +01:00
2015-12-28 13:41:44 +01:00
2015-03-15 10:04:27 -04:00
2019-11-06 12:18:20 +01:00
2021-12-14 10:04:47 +01:00
2016-09-19 14:32:21 +02:00
2016-03-18 17:31:38 +01:00
2015-12-28 13:41:44 +01:00
2017-12-25 14:23:40 +01:00
2019-11-06 12:18:20 +01:00
2022-09-05 10:23:57 +02:00
2022-02-16 12:43:55 +01:00
2016-08-17 11:13:07 +02:00
2022-01-27 08:47:31 +01:00
2021-12-14 10:04:47 +01:00
2022-01-27 08:47:31 +01:00
2016-10-07 09:59:48 +02:00
2016-08-05 13:39:23 +02:00