powermate 6-1:0.0: powermate_irq - usb_submit_urb failed with result: -19
powermate: config urb returned -108
==================================================================
BUG: KFENCE: use-after-free read in __lock_acquire+0xd87/0x54a0 kernel/locking/lockdep.c:4897
Use-after-free read at 0xffff88823bd38f58 (in kfence-#155):
__lock_acquire+0xd87/0x54a0 kernel/locking/lockdep.c:4897
lock_acquire kernel/locking/lockdep.c:5637 [inline]
lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162
powermate_config_complete+0x79/0xb0 drivers/input/misc/powermate.c:202
__usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1656
usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1726
dummy_timer+0x11f9/0x32b0 drivers/usb/gadget/udc/dummy_hcd.c:1987
call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421
expire_timers kernel/time/timer.c:1466 [inline]
__run_timers.part.0+0x675/0xa20 kernel/time/timer.c:1734
__run_timers kernel/time/timer.c:1715 [inline]
run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747
__do_softirq+0x29b/0x9c2 kernel/softirq.c:558
invoke_softirq kernel/softirq.c:432 [inline]
__irq_exit_rcu+0x123/0x180 kernel/softirq.c:637
irq_exit_rcu+0x5/0x20 kernel/softirq.c:649
sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638
lock_acquire+0x1ef/0x510 kernel/locking/lockdep.c:5605
rcu_lock_acquire include/linux/rcupdate.h:268 [inline]
rcu_read_lock include/linux/rcupdate.h:688 [inline]
folio_memcg_lock+0x3a/0x3e0 mm/memcontrol.c:2010
page_add_file_rmap+0x36/0xbb0 mm/rmap.c:1216
do_set_pte+0x362/0x550 mm/memory.c:3980
filemap_map_pages+0xbd5/0x1630 mm/filemap.c:3335
do_fault_around mm/memory.c:4143 [inline]
do_read_fault mm/memory.c:4158 [inline]
do_fault mm/memory.c:4293 [inline]
handle_pte_fault mm/memory.c:4551 [inline]
__handle_mm_fault+0x28c6/0x5120 mm/memory.c:4686
handle_mm_fault+0x1c8/0x790 mm/memory.c:4784
do_user_addr_fault+0x489/0x11c0 arch/x86/mm/fault.c:1397
handle_page_fault arch/x86/mm/fault.c:1485 [inline]
exc_page_fault+0x9e/0x180 arch/x86/mm/fault.c:1541
asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:568
kfence-#155: 0xffff88823bd38f00-0xffff88823bd38fd7, size=216, cache=kmalloc-256
allocated by task 3653 on cpu 0 at 275.349258s:
kmalloc include/linux/slab.h:590 [inline]
kzalloc include/linux/slab.h:724 [inline]
powermate_probe+0x24a/0x12a0 drivers/input/misc/powermate.c:323
usb_probe_interface+0x315/0x7f0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:517 [inline]
really_probe+0x245/0xcc0 drivers/base/dd.c:596
__driver_probe_device+0x338/0x4d0 drivers/base/dd.c:751
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:781
__device_attach_driver+0x20b/0x2f0 drivers/base/dd.c:898
bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:427
__device_attach+0x228/0x4a0 drivers/base/dd.c:969
bus_probe_device+0x1e4/0x290 drivers/base/bus.c:487
device_add+0xc17/0x1ee0 drivers/base/core.c:3394
usb_set_configuration+0x101e/0x1900 drivers/usb/core/message.c:2170
usb_generic_driver_probe+0xba/0x100 drivers/usb/core/generic.c:238
usb_probe_device+0xd9/0x2c0 drivers/usb/core/driver.c:293
call_driver_probe drivers/base/dd.c:517 [inline]
really_probe+0x245/0xcc0 drivers/base/dd.c:596
__driver_probe_device+0x338/0x4d0 drivers/base/dd.c:751
driver_probe_device+0x4c/0x1a0 drivers/base/dd.c:781
__device_attach_driver+0x20b/0x2f0 drivers/base/dd.c:898
bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:427
__device_attach+0x228/0x4a0 drivers/base/dd.c:969
bus_probe_device+0x1e4/0x290 drivers/base/bus.c:487
device_add+0xc17/0x1ee0 drivers/base/core.c:3394
usb_new_device.cold+0x63f/0x108e drivers/usb/core/hub.c:2563
hub_port_connect drivers/usb/core/hub.c:5353 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5497 [inline]
port_event drivers/usb/core/hub.c:5643 [inline]
hub_event+0x23e5/0x4460 drivers/usb/core/hub.c:5725
process_one_work+0x9b2/0x1690 kernel/workqueue.c:2298
worker_thread+0x658/0x11f0 kernel/workqueue.c:2445
kthread+0x405/0x4f0 kernel/kthread.c:327
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
freed by task 1396 on cpu 0 at 1333.381735s:
powermate_disconnect+0x1ce/0x250 drivers/input/misc/powermate.c:432
usb_unbind_interface+0x1d8/0x8e0 drivers/usb/core/driver.c:458
__device_release_driver+0x5d7/0x700 drivers/base/dd.c:1205
device_release_driver_internal drivers/base/dd.c:1236 [inline]
device_release_driver+0x26/0x40 drivers/base/dd.c:1259
bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:529
device_del+0x502/0xd60 drivers/base/core.c:3581
usb_disable_device+0x35b/0x7b0 drivers/usb/core/message.c:1419
usb_disconnect.cold+0x27a/0x78e drivers/usb/core/hub.c:2225
hub_quiesce+0x170/0x310 drivers/usb/core/hub.c:1327
hub_disconnect+0xcb/0x510 drivers/usb/core/hub.c:1722
usb_unbind_interface+0x1d8/0x8e0 drivers/usb/core/driver.c:458
__device_release_driver+0x5d7/0x700 drivers/base/dd.c:1205
device_release_driver_internal drivers/base/dd.c:1236 [inline]
device_release_driver+0x26/0x40 drivers/base/dd.c:1259
usb_driver_release_interface+0x102/0x180 drivers/usb/core/driver.c:627
proc_disconnect_claim+0x217/0x380 drivers/usb/core/devio.c:2464
usbdev_do_ioctl drivers/usb/core/devio.c:2747 [inline]
usbdev_ioctl+0x2b43/0x36c0 drivers/usb/core/devio.c:2791
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:874 [inline]
__se_sys_ioctl fs/ioctl.c:860 [inline]
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x44/0xae
CPU: 0 PID: 1412 Comm: modprobe Not tainted 5.16.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__lock_acquire+0xd87/0x54a0 kernel/locking/lockdep.c:4897
Code: c8 00 00 00 89 05 d9 07 10 0e e9 bd 00 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 80 3c 02 00 0f 85 f3 2f 00 00 <48> 81 3b 20 a5 17 8f 0f 84 52 f3 ff ff 41 83 fa 01 0f 87 5a f3 ff
RSP: 0000:ffffc90000007828 EFLAGS: 00010046
RAX: dffffc0000000000 RBX: ffff88823bd38f58 RCX: 0000000000000000
RDX: 1ffff110477a71eb RSI: 0000000000000000 RDI: 0000000000000001
RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: ffff888021870000 R14: 0000000000000000 R15: 0000000000000001
FS: 0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffff88823bd38f58 CR3: 0000000018324000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
lock_acquire kernel/locking/lockdep.c:5637 [inline]
lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162
powermate_config_complete+0x79/0xb0 drivers/input/misc/powermate.c:202
__usb_hcd_giveback_urb+0x2b0/0x5c0 drivers/usb/core/hcd.c:1656
usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1726
dummy_timer+0x11f9/0x32b0 drivers/usb/gadget/udc/dummy_hcd.c:1987
call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421
expire_timers kernel/time/timer.c:1466 [inline]
__run_timers.part.0+0x675/0xa20 kernel/time/timer.c:1734
__run_timers kernel/time/timer.c:1715 [inline]
run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747
__do_softirq+0x29b/0x9c2 kernel/softirq.c:558
invoke_softirq kernel/softirq.c:432 [inline]
__irq_exit_rcu+0x123/0x180 kernel/softirq.c:637
irq_exit_rcu+0x5/0x20 kernel/softirq.c:649
sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:lock_acquire+0x1ef/0x510 kernel/locking/lockdep.c:5605
Code: be a5 7e 83 f8 01 0f 85 b4 02 00 00 9c 58 f6 c4 02 0f 85 9f 02 00 00 48 83 7c 24 08 00 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 48 c7 43 08 00 00 00 00 48 8b 84 24
RSP: 0000:ffffc9000b2e79d0 EFLAGS: 00000206
RAX: dffffc0000000000 RBX: 1ffff9200165cf3c RCX: cddf262f2262fc8f
RDX: 1ffff1100430e14b RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff8ff76a07
R10: fffffbfff1feed40 R11: 0000000000000000 R12: 0000000000000002
R13: 0000000000000000 R14: ffffffff8bb83e20 R15: 0000000000000000
rcu_lock_acquire include/linux/rcupdate.h:268 [inline]
rcu_read_lock include/linux/rcupdate.h:688 [inline]
folio_memcg_lock+0x3a/0x3e0 mm/memcontrol.c:2010
page_add_file_rmap+0x36/0xbb0 mm/rmap.c:1216
do_set_pte+0x362/0x550 mm/memory.c:3980
filemap_map_pages+0xbd5/0x1630 mm/filemap.c:3335
do_fault_around mm/memory.c:4143 [inline]
do_read_fault mm/memory.c:4158 [inline]
do_fault mm/memory.c:4293 [inline]
handle_pte_fault mm/memory.c:4551 [inline]
__handle_mm_fault+0x28c6/0x5120 mm/memory.c:4686
handle_mm_fault+0x1c8/0x790 mm/memory.c:4784
do_user_addr_fault+0x489/0x11c0 arch/x86/mm/fault.c:1397
handle_page_fault arch/x86/mm/fault.c:1485 [inline]
exc_page_fault+0x9e/0x180 arch/x86/mm/fault.c:1541
asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:568
RIP: 0033:0x7f140775d9b0
Code: 00 00 48 89 05 29 f6 01 00 eb dc 48 8d 0d e8 7e 01 00 ba a6 00 00 00 48 8d 35 f1 44 01 00 48 8d 3d e5 69 01 00 e8 90 9d 00 00 <80> 3d fd f5 01 00 00 75 0f 4c 8b 05 f8 f5 01 00 4c 89 c0 c3 0f 1f
RSP: 002b:00007ffc2f25ecc8 EFLAGS: 00010246
RAX: 0000000000000000 RBX: 0000562d168364b8 RCX: 00007f140774b238
RDX: 0000562d16839e40 RSI: 0000000000000000 RDI: 00007f140774b000
RBP: 00007ffc2f25ef90 R08: 0000000000000020 R09: 0000000000000007
R10: 0000000000000000 R11: 0000000000000008 R12: 00007f1407771812
R13: 0000000000000001 R14: 00007ffc2f25ed48 R15: 0000000000000000
==================================================================
----------------
Code disassembly (best guess):
0: c8 00 00 00 enterq $0x0,$0x0
4: 89 05 d9 07 10 0e mov %eax,0xe1007d9(%rip) # 0xe1007e3
a: e9 bd 00 00 00 jmpq 0xcc
f: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
16: fc ff df
19: 48 89 da mov %rbx,%rdx
1c: 48 c1 ea 03 shr $0x3,%rdx
20: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1)
24: 0f 85 f3 2f 00 00 jne 0x301d
* 2a: 48 81 3b 20 a5 17 8f cmpq $0xffffffff8f17a520,(%rbx) <-- trapping instruction
31: 0f 84 52 f3 ff ff je 0xfffff389
37: 41 83 fa 01 cmp $0x1,%r10d
3b: 0f .byte 0xf
3c: 87 5a f3 xchg %ebx,-0xd(%rdx)
3f: ff .byte 0xff