kobject: 'raw-gadget.0' (ffff888029e82600): calling ktype release driver: 'raw-gadget.0': driver_release kobject: 'raw-gadget.0': free name ================================================================== BUG: KFENCE: use-after-free read in dev_name include/linux/device.h:934 [inline] BUG: KFENCE: use-after-free read in __dynamic_dev_dbg+0x1e4/0x310 lib/dynamic_debug.c:904 Use-after-free read at 0xffff88807acc08c8 (in kfence-#95): dev_name include/linux/device.h:934 [inline] __dynamic_dev_dbg+0x1e4/0x310 lib/dynamic_debug.c:904 display_close+0x103/0x150 drivers/media/rc/imon.c:580 __fput+0x3ff/0xb50 fs/file_table.c:512 task_work_run+0x150/0x240 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x951/0x2ae0 kernel/exit.c:1011 do_group_exit+0xd5/0x2a0 kernel/exit.c:1154 get_signal+0x1ec7/0x21e0 kernel/signal.c:3051 arch_do_signal_or_restart+0x91/0x7a0 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:66 [inline] exit_to_user_mode_loop+0x139/0x700 kernel/entry/common.c:101 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:336 [inline] __do_fast_syscall_32+0x59f/0x8b0 arch/x86/entry/syscall_32.c:294 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:316 entry_SYSENTER_compat_after_hwframe+0x84/0x8e kfence-#95: 0xffff88807acc0800-0xffff88807acc0d8f, size=1424, cache=kmalloc-2k allocated by task 7179 on cpu 3 at 1958.827714s (2.765967s ago): _kmalloc_noprof include/linux/slab.h:991 [inline] _kzalloc_noprof include/linux/slab.h:1312 [inline] usb_set_configuration+0x10cb/0x1c60 drivers/usb/core/message.c:2096 usb_generic_driver_probe+0xa1/0xe0 drivers/usb/core/generic.c:250 usb_probe_device+0xef/0x400 drivers/usb/core/driver.c:293 call_driver_probe drivers/base/dd.c:628 [inline] really_probe+0x241/0xa60 drivers/base/dd.c:706 __driver_probe_device+0x210/0x460 drivers/base/dd.c:868 driver_probe_device+0x4a/0x140 drivers/base/dd.c:898 __device_attach_driver+0x1df/0x320 drivers/base/dd.c:1026 bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500 __device_attach+0x1e4/0x4d0 drivers/base/dd.c:1098 device_initial_probe+0xaf/0xd0 drivers/base/dd.c:1153 bus_probe_device+0x64/0x160 drivers/base/bus.c:620 device_add+0x121d/0x1970 drivers/base/core.c:3776 usb_new_device.part.0+0xcc2/0x1686 drivers/usb/core/hub.c:2708 usb_new_device include/linux/workqueue.h:715 [inline] hub_port_connect drivers/usb/core/hub.c:5580 [inline] hub_port_connect_change drivers/usb/core/hub.c:5720 [inline] port_event drivers/usb/core/hub.c:5884 [inline] hub_event.cold+0x1e3/0xe90 drivers/usb/core/hub.c:5966 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396 process_scheduled_works kernel/workqueue.c:3479 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 freed by task 7179 on cpu 3 at 1959.516260s (2.077677s ago): device_release+0xd2/0x270 drivers/base/core.c:2640 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1f7/0x640 lib/kobject.c:737 put_device+0x1f/0x30 drivers/base/core.c:3884 usb_disable_device+0x44a/0x810 drivers/usb/core/message.c:1485 usb_disconnect+0x2e2/0x9a0 drivers/usb/core/hub.c:2350 hub_port_connect drivers/usb/core/hub.c:5420 [inline] hub_port_connect_change drivers/usb/core/hub.c:5720 [inline] port_event drivers/usb/core/hub.c:5884 [inline] hub_event+0x1bb1/0x4420 drivers/usb/core/hub.c:5966 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396 process_scheduled_works kernel/workqueue.c:3479 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 CPU: 2 UID: 0 PID: 10299 Comm: syz.7.2933 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:dev_name include/linux/device.h:934 [inline] RIP: 0010:__dynamic_dev_dbg+0x1e4/0x310 lib/dynamic_debug.c:904 Code: c7 85 48 ff ff ff 00 00 00 00 48 c7 85 50 ff ff ff 00 00 00 00 48 c7 85 58 ff ff ff 00 00 00 00 80 3c 08 00 0f 85 13 01 00 00 <4c> 8b 7b 50 4d 85 ff 0f 84 a8 00 00 00 48 89 df e8 37 33 0b 01 49 RSP: 0018:ffffc90002e77878 EFLAGS: 00010246 RAX: 1ffff1100f598119 RBX: ffff88807acc0878 RCX: dffffc0000000000 RDX: ffffffff8cebd460 RSI: ffff88807acc0878 RDI: ffff88807acc08c8 RBP: ffffc90002e77a20 R08: 0000000000000001 R09: 0000000000000000 R10: ffffc90002e77a30 R11: 0000000000000000 R12: 1ffff920005cef10 R13: ffffffff913cd0c8 R14: ffffc90002e779c0 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff888096b60000(0000) knlGS:0000000000000000 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: ffff88807acc08c8 CR3: 000000004cebe000 CR4: 0000000000352ef0 Call Trace: display_close+0x103/0x150 drivers/media/rc/imon.c:580 __fput+0x3ff/0xb50 fs/file_table.c:512 task_work_run+0x150/0x240 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x951/0x2ae0 kernel/exit.c:1011 do_group_exit+0xd5/0x2a0 kernel/exit.c:1154 get_signal+0x1ec7/0x21e0 kernel/signal.c:3051 arch_do_signal_or_restart+0x91/0x7a0 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:66 [inline] exit_to_user_mode_loop+0x139/0x700 kernel/entry/common.c:101 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:336 [inline] __do_fast_syscall_32+0x59f/0x8b0 arch/x86/entry/syscall_32.c:294 do_fast_syscall_32+0x32/0x70 arch/x86/entry/syscall_32.c:316 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7f12fec Code: Unable to access opcode bytes at 0xf7f12fc2. RSP: 002b:00000000f52d85bc EFLAGS: 00000292 ORIG_RAX: 00000000000000f0 RAX: fffffffffffffe00 RBX: 00000000f73d5020 RCX: 0000000000000080 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000f73d5024 RBP: 0000000000000081 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ================================================================== ---------------- Code disassembly (best guess): 0: c7 85 48 ff ff ff 00 movl $0x0,-0xb8(%rbp) 7: 00 00 00 a: 48 c7 85 50 ff ff ff movq $0x0,-0xb0(%rbp) 11: 00 00 00 00 15: 48 c7 85 58 ff ff ff movq $0x0,-0xa8(%rbp) 1c: 00 00 00 00 20: 80 3c 08 00 cmpb $0x0,(%rax,%rcx,1) 24: 0f 85 13 01 00 00 jne 0x13d * 2a: 4c 8b 7b 50 mov 0x50(%rbx),%r15 <-- trapping instruction 2e: 4d 85 ff test %r15,%r15 31: 0f 84 a8 00 00 00 je 0xdf 37: 48 89 df mov %rbx,%rdi 3a: e8 37 33 0b 01 call 0x10b3376 3f: 49 rex.WB