xpad 2-1:0.0: xpad_irq_in - usb_submit_urb failed with result -19 xpad 2-1:0.0: xpad_irq_out - usb_submit_urb failed with result -19 ================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:199 [inline] BUG: KASAN: use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] BUG: KASAN: use-after-free in do_raw_spin_lock+0x25c/0x290 kernel/locking/spinlock_debug.c:112 Read of size 4 at addr ffff8881cde7005c by task udevd/239 CPU: 1 PID: 239 Comm: udevd Not tainted 5.6.0-rc3-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+0xef/0x16e lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x314 mm/kasan/report.c:374 __kasan_report.cold+0x37/0x77 mm/kasan/report.c:506 kasan_report+0xe/0x20 mm/kasan/common.c:641 __read_once_size include/linux/compiler.h:199 [inline] debug_spin_lock_before kernel/locking/spinlock_debug.c:83 [inline] do_raw_spin_lock+0x25c/0x290 kernel/locking/spinlock_debug.c:112 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:117 [inline] _raw_spin_lock_irqsave+0x3a/0x50 kernel/locking/spinlock.c:159 __wake_up_common_lock+0xb4/0x130 kernel/sched/wait.c:122 __usb_unanchor_urb drivers/usb/core/urb.c:155 [inline] usb_anchor_resume_wakeups+0xbe/0xe0 drivers/usb/core/urb.c:149 __usb_hcd_giveback_urb+0x1fa/0x470 drivers/usb/core/hcd.c:1650 usb_hcd_giveback_urb+0x368/0x420 drivers/usb/core/hcd.c:1713 dummy_timer+0x1258/0x32ae drivers/usb/gadget/udc/dummy_hcd.c:1966 call_timer_fn+0x195/0x6f0 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0x5f9/0x1500 kernel/time/timer.c:1786 __do_softirq+0x21e/0x950 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x178/0x1a0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:546 [inline] smp_apic_timer_interrupt+0x141/0x540 arch/x86/kernel/apic/apic.c:1146 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:lock_is_held_type+0x1ce/0x240 kernel/locking/lockdep.c:4526 Code: 89 f9 48 c1 e9 03 0f b6 0c 11 48 89 fa 83 e2 07 83 c2 03 38 ca 7c 04 84 c9 75 6e c7 83 4c 08 00 00 00 00 00 00 ff 74 24 08 9d <48> 83 c4 18 5b 5d 41 5c 41 5d 41 5e 41 5f c3 31 c0 eb a8 48 83 c4 RSP: 0018:ffff8881d3317780 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: ffff8881d3026200 RCX: 0000000000000000 RDX: 0000000000000007 RSI: ffff8881ce6ddcc0 RDI: ffff8881d3026a4c RBP: ffff8881d3026200 R08: ffff8881d3026200 R09: ffffed103a662f04 R10: ffffed103a662f03 R11: 0000000000000003 R12: ffff8881d3026a48 R13: ffffed103a604d49 R14: ffff8881ce6ddcc0 R15: ffff8881d3026aa0 lock_is_held include/linux/lockdep.h:361 [inline] xa_head include/linux/xarray.h:1164 [inline] xas_reload include/linux/xarray.h:1528 [inline] xas_reload include/linux/xarray.h:1522 [inline] find_get_entry+0x52b/0x810 mm/filemap.c:1529 find_lock_entry+0x2e/0x3a0 mm/filemap.c:1562 shmem_getpage_gfp.isra.0+0x1bf/0x19e0 mm/shmem.c:1771 shmem_getpage mm/shmem.c:154 [inline] shmem_write_begin+0x100/0x1e0 mm/shmem.c:2488 generic_perform_write+0x20a/0x4f0 mm/filemap.c:3287 __generic_file_write_iter+0x390/0x5c0 mm/filemap.c:3416 generic_file_write_iter+0x3f0/0x62d mm/filemap.c:3448 call_write_iter include/linux/fs.h:1901 [inline] new_sync_write+0x420/0x650 fs/read_write.c:483 __vfs_write+0xc9/0x100 fs/read_write.c:496 vfs_write+0x262/0x5c0 fs/read_write.c:558 ksys_write+0x127/0x250 fs/read_write.c:611 do_syscall_64+0xb6/0x5a0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f82993de370 Code: 73 01 c3 48 8b 0d c8 4a 2b 00 31 d2 48 29 c2 64 89 11 48 83 c8 ff eb ea 90 90 83 3d 85 a2 2b 00 00 75 10 b8 01 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 0e 8a 01 00 48 89 04 24 RSP: 002b:00007ffe559f6978 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000026 RCX: 00007f82993de370 RDX: 0000000000000026 RSI: 00007f8299cdd000 RDI: 0000000000000005 RBP: 00007f8299cdd000 R08: 00007f8299cd67a0 R09: 00000000ffffffff R10: 0000000001532480 R11: 0000000000000246 R12: 00000000015259a0 R13: 0000000000000026 R14: 00000000015325b4 R15: 0000000000000026 Allocated by task 4742: save_stack+0x1b/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:515 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:488 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] xpad_probe+0x24b/0x1b20 drivers/input/joystick/xpad.c:1717 usb_probe_interface+0x310/0x800 drivers/usb/core/driver.c:374 really_probe+0x290/0xac0 drivers/base/dd.c:551 driver_probe_device+0x223/0x350 drivers/base/dd.c:724 __device_attach_driver+0x1d1/0x290 drivers/base/dd.c:831 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:431 __device_attach+0x217/0x390 drivers/base/dd.c:897 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0x1459/0x1bf0 drivers/base/core.c:2487 usb_set_configuration+0xe47/0x17d0 drivers/usb/core/message.c:2023 usb_generic_driver_probe+0x9d/0xe0 drivers/usb/core/generic.c:241 usb_probe_device+0xd9/0x230 drivers/usb/core/driver.c:272 really_probe+0x290/0xac0 drivers/base/dd.c:551 driver_probe_device+0x223/0x350 drivers/base/dd.c:724 __device_attach_driver+0x1d1/0x290 drivers/base/dd.c:831 bus_for_each_drv+0x162/0x1e0 drivers/base/bus.c:431 __device_attach+0x217/0x390 drivers/base/dd.c:897 bus_probe_device+0x1e4/0x290 drivers/base/bus.c:491 device_add+0x1459/0x1bf0 drivers/base/core.c:2487 usb_new_device.cold+0x540/0xcd0 drivers/usb/core/hub.c:2544 hub_port_connect drivers/usb/core/hub.c:5191 [inline] hub_port_connect_change drivers/usb/core/hub.c:5331 [inline] port_event drivers/usb/core/hub.c:5477 [inline] hub_event+0x21cb/0x4300 drivers/usb/core/hub.c:5559 process_one_work+0x94b/0x1620 kernel/workqueue.c:2264 worker_thread+0x96/0xe20 kernel/workqueue.c:2410 kthread+0x318/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Freed by task 4727: save_stack+0x1b/0x80 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0x117/0x160 mm/kasan/common.c:476 slab_free_hook mm/slub.c:1444 [inline] slab_free_freelist_hook mm/slub.c:1477 [inline] slab_free mm/slub.c:3024 [inline] kfree+0xd5/0x300 mm/slub.c:3976 xpad_disconnect+0x1cb/0x4a3 drivers/input/joystick/xpad.c:1865 usb_unbind_interface+0x1bd/0x8a0 drivers/usb/core/driver.c:436 __device_release_driver drivers/base/dd.c:1137 [inline] device_release_driver_internal+0x42f/0x500 drivers/base/dd.c:1168 bus_remove_device+0x2eb/0x5a0 drivers/base/bus.c:533 device_del+0x481/0xd30 drivers/base/core.c:2664 usb_disable_device+0x23d/0x790 drivers/usb/core/message.c:1237 usb_disconnect+0x293/0x900 drivers/usb/core/hub.c:2207 hub_port_connect drivers/usb/core/hub.c:5042 [inline] hub_port_connect_change drivers/usb/core/hub.c:5331 [inline] port_event drivers/usb/core/hub.c:5477 [inline] hub_event+0x1a1d/0x4300 drivers/usb/core/hub.c:5559 process_one_work+0x94b/0x1620 kernel/workqueue.c:2264 worker_thread+0x96/0xe20 kernel/workqueue.c:2410 kthread+0x318/0x420 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff8881cde70000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 92 bytes inside of 1024-byte region [ffff8881cde70000, ffff8881cde70400) The buggy address belongs to the page: page:ffffea0007379c00 refcount:1 mapcount:0 mapping:ffff8881da002280 index:0xffff8881cde77000 compound_mapcount: 0 flags: 0x200000000010200(slab|head) raw: 0200000000010200 ffffea0006add608 ffffea000719aa08 ffff8881da002280 raw: ffff8881cde77000 000000000010000f 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881cde6ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881cde6ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881cde70000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881cde70080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881cde70100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================