xpad 4-1:0.65: xpad_irq_in - usb_submit_urb failed with result -19 xpad 4-1:0.65: xpad_irq_out - usb_submit_urb failed with result -19 ================================================================== BUG: KASAN: use-after-free in register_lock_class+0x1591/0x1630 kernel/locking/lockdep.c:1250 Read of size 2 at addr ffff8880601e8092 by task systemd-udevd/3889 CPU: 1 PID: 3889 Comm: systemd-udevd Not tainted 5.8.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x18f/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xae/0x436 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 register_lock_class+0x1591/0x1630 kernel/locking/lockdep.c:1250 __lock_acquire+0xfa/0x56e0 kernel/locking/lockdep.c:4259 lock_acquire+0x1f1/0xad0 kernel/locking/lockdep.c:4959 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x8c/0xc0 kernel/locking/spinlock.c:159 __wake_up_common_lock+0xb4/0x130 kernel/sched/wait.c:122 usb_anchor_resume_wakeups drivers/usb/core/urb.c:909 [inline] usb_anchor_resume_wakeups+0xbe/0xe0 drivers/usb/core/urb.c:902 __usb_hcd_giveback_urb+0x31a/0x540 drivers/usb/core/hcd.c:1653 usb_hcd_giveback_urb+0x367/0x410 drivers/usb/core/hcd.c:1716 skbpoolfree drivers/block/aoe/aoedev.c:432 [inline] freedev drivers/block/aoe/aoedev.c:290 [inline] dummy_timer+0x11ea/0x2f9f drivers/block/aoe/aoedev.c:366 call_timer_fn+0x1ac/0x760 kernel/time/timer.c:1415 expire_timers kernel/time/timer.c:1460 [inline] __run_timers.part.0+0x54c/0xa20 kernel/time/timer.c:1784 __run_timers kernel/time/timer.c:1756 [inline] run_timer_softirq+0xae/0x1a0 kernel/time/timer.c:1797 __do_softirq+0x34c/0xa60 kernel/softirq.c:292 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:711 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline] do_softirq_own_stack+0x111/0x170 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:387 [inline] __irq_exit_rcu kernel/softirq.c:417 [inline] irq_exit_rcu+0x229/0x270 kernel/softirq.c:429 sysvec_apic_timer_interrupt+0x54/0x120 arch/x86/kernel/apic/apic.c:1091 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:585 RIP: 0010:__sanitizer_cov_trace_const_cmp1+0x0/0x20 kernel/kcov.c:270 Code: 66 2e 0f 1f 84 00 00 00 00 00 48 8b 0c 24 48 89 f2 48 89 fe bf 06 00 00 00 e9 0c ff ff ff 66 90 66 2e 0f 1f 84 00 00 00 00 00 <48> 8b 0c 24 40 0f b6 d6 40 0f b6 f7 bf 01 00 00 00 e9 ea fe ff ff RSP: 0018:ffffc900015f78f0 EFLAGS: 00000202 RAX: 0000000000000000 RBX: 000000000000000d RCX: ffffffff83629507 RDX: ffff8880a21be000 RSI: 000000000000000d RDI: 0000000000000010 RBP: ffff8880a7492880 R08: 0000000000000001 R09: ffffffff8cac46e7 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000002 R13: 0000000000000172 R14: dffffc0000000000 R15: 0000000000000000 tomoyo_domain_quota_is_ok+0x32a/0x550 security/tomoyo/util.c:1070 tomoyo_supervisor+0x2d4/0xeb0 security/tomoyo/common.c:2089 tomoyo_audit_path_log security/tomoyo/file.c:168 [inline] tomoyo_path_permission security/tomoyo/file.c:587 [inline] tomoyo_path_permission+0x25c/0x360 security/tomoyo/file.c:573 tomoyo_path_perm+0x2e7/0x3f0 security/tomoyo/file.c:838 security_inode_getattr+0xcf/0x140 security/security.c:1278 vfs_getattr fs/stat.c:121 [inline] vfs_statx_fd+0x70/0xf0 fs/stat.c:151 vfs_fstat include/linux/fs.h:3313 [inline] __do_sys_newfstat+0x88/0x100 fs/stat.c:398 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:384 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f0ffe0b42e2 Code: Bad RIP value. RSP: 002b:00007ffc70634f98 EFLAGS: 00000246 ORIG_RAX: 0000000000000005 RAX: ffffffffffffffda RBX: 000000000000000f RCX: 00007f0ffe0b42e2 RDX: 00007ffc70634fa0 RSI: 00007ffc70634fa0 RDI: 000000000000000f RBP: 00007f0fff241710 R08: 0000556e45a6ef30 R09: 0000000000001010 R10: 00007f0ffe372b58 R11: 0000000000000246 R12: 0000000000000000 R13: 0000556e45a6ec40 R14: 00000000000000ff R15: 0000556e45a6ec40 Allocated by task 2525: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:494 kmem_cache_alloc_trace+0x14f/0x2d0 mm/slab.c:3551 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] xpad_probe+0x24b/0x1b60 drivers/input/joystick/xpad.c:1729 usb_probe_interface+0x2f7/0x780 drivers/usb/core/driver.c:374 really_probe+0x282/0x8a0 drivers/base/dd.c:520 driver_probe_device+0xfe/0x1d0 drivers/base/dd.c:696 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:802 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x28d/0x3f0 drivers/base/dd.c:868 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xacf/0x1be0 drivers/base/core.c:2700 usb_set_configuration+0xef6/0x17a0 drivers/usb/core/message.c:2032 usb_generic_driver_probe+0xba/0xf2 drivers/usb/core/generic.c:241 usb_probe_device+0xc6/0x210 drivers/usb/core/driver.c:272 really_probe+0x282/0x8a0 drivers/base/dd.c:520 driver_probe_device+0xfe/0x1d0 drivers/base/dd.c:696 __device_attach_driver+0x1c2/0x220 drivers/base/dd.c:802 bus_for_each_drv+0x15f/0x1e0 drivers/base/bus.c:431 __device_attach+0x28d/0x3f0 drivers/base/dd.c:868 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0xacf/0x1be0 drivers/base/core.c:2700 usb_new_device.cold+0x748/0x103b drivers/usb/core/hub.c:2554 hub_port_connect drivers/usb/core/hub.c:5208 [inline] hub_port_connect_change drivers/usb/core/hub.c:5348 [inline] port_event drivers/usb/core/hub.c:5494 [inline] hub_event+0x2033/0x3e40 drivers/usb/core/hub.c:5576 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:291 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293 Freed by task 2520: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0xf5/0x140 mm/kasan/common.c:455 __cache_free mm/slab.c:3426 [inline] kfree+0x103/0x2c0 mm/slab.c:3757 xpad_disconnect+0x1b9/0x474 drivers/input/joystick/xpad.c:1877 usb_unbind_interface+0x1d8/0x8d0 drivers/usb/core/driver.c:436 __device_release_driver+0x3b7/0x6e0 drivers/base/dd.c:1108 device_release_driver_internal drivers/base/dd.c:1139 [inline] device_release_driver+0x26/0x40 drivers/base/dd.c:1162 bus_remove_device+0x2dc/0x4a0 drivers/base/bus.c:533 device_del+0x47c/0xd20 drivers/base/core.c:2877 usb_disable_device+0x361/0x800 drivers/usb/core/message.c:1245 usb_disconnect.cold+0x251/0x742 drivers/usb/core/hub.c:2217 hub_port_connect drivers/usb/core/hub.c:5059 [inline] hub_port_connect_change drivers/usb/core/hub.c:5348 [inline] port_event drivers/usb/core/hub.c:5494 [inline] hub_event+0x1965/0x3e40 drivers/usb/core/hub.c:5576 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415 kthread+0x3b5/0x4a0 kernel/kthread.c:291 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293 The buggy address belongs to the object at ffff8880601e8000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 146 bytes inside of 1024-byte region [ffff8880601e8000, ffff8880601e8400) The buggy address belongs to the page: page:ffffea0001807a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00014dcf48 ffffea00024e3c48 ffff8880aa000c40 raw: 0000000000000000 ffff8880601e8000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880601e7f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880601e8000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880601e8080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880601e8100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880601e8180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================