xpad 1-1:179.65: xpad_irq_in - usb_submit_urb failed with result -19
xpad 1-1:179.65: xpad_irq_out - usb_submit_urb failed with result -19
==================================================================
BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x23d/0x290
Read of size 4 at addr ffff8881765c605c by task kworker/u9:3/1089

CPU: 1 UID: 0 PID: 1089 Comm: kworker/u9:3 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: iou_exit io_ring_exit_work
Call Trace:
 <IRQ>
 dump_stack_lvl+0x189/0x250
 print_report+0xca/0x240
 kasan_report+0x118/0x150
 do_raw_spin_lock+0x23d/0x290
 _raw_spin_lock_irqsave+0xb3/0xf0
 __wake_up_common_lock+0x2f/0x1f0
 __usb_hcd_giveback_urb+0x3b0/0x540
 dummy_timer+0x85f/0x44c0
 __hrtimer_run_queues+0x52c/0xc60
 hrtimer_run_softirq+0x187/0x2b0
 handle_softirqs+0x286/0x870
 __irq_exit_rcu+0xca/0x1f0
 irq_exit_rcu+0x9/0x30
 sysvec_apic_timer_interrupt+0xa6/0xc0
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20
RIP: 0010:filter_irq_stacks+0x86/0xa0
Code: 0f 92 c1 48 3d eb 48 4a 8b 0f 93 c0 08 c8 74 11 48 ff c3 49 83 c7 08 49 39 dc 75 ae 44 89 e3 eb 06 ff c3 eb 02 31 db 89 d8 5b <41> 5c 41 5d 41 5e 41 5f c3 cc cc cc cc cc cc cc cc cc cc cc cc cc
RSP: 0018:ffffc90007eaf510 EFLAGS: 00000246
RAX: 000000000000000b RBX: 0000000000000000 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 000000000000000b RDI: ffffc90007eaf5a0
RBP: ffffc90007eaf7d0 R08: 000000000000001f R09: ffffffff81739c45
R10: ffffc90007eaf4b8 R11: ffffffff81ac4240 R12: 000000000000000b
R13: dffffc0000000000 R14: ffffc90007eaf5a0 R15: ffffc90007eaf5f8
 stack_depot_save_flags+0x40/0x860
 kasan_save_stack+0x4d/0x60
 kasan_record_aux_stack+0xbd/0xd0
 kmem_cache_free+0x4a2/0x690
 __io_req_caches_free+0x1c1/0x270
 io_req_caches_free+0x21/0x60
 io_ring_exit_work+0x415/0x930
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0
 ret_from_fork+0x4bc/0x870
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 6116:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_cache_noprof+0x3e2/0x700
 xpad_probe+0x428/0x1fc0
 usb_probe_interface+0x668/0xc30
 really_probe+0x26d/0x9e0
 __driver_probe_device+0x18c/0x2f0
 driver_probe_device+0x4f/0x430
 __device_attach_driver+0x2ce/0x530
 bus_for_each_drv+0x251/0x2e0
 __device_attach+0x2b8/0x400
 bus_probe_device+0x185/0x260
 device_add+0x7b6/0xb50
 usb_set_configuration+0x1a87/0x20e0
 usb_generic_driver_probe+0x8d/0x150
 usb_probe_device+0x1c4/0x390
 really_probe+0x26d/0x9e0
 __driver_probe_device+0x18c/0x2f0
 driver_probe_device+0x4f/0x430
 __device_attach_driver+0x2ce/0x530
 bus_for_each_drv+0x251/0x2e0
 __device_attach+0x2b8/0x400
 bus_probe_device+0x185/0x260
 device_add+0x7b6/0xb50
 usb_new_device+0xa39/0x16f0
 hub_event+0x2958/0x4a20
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0
 ret_from_fork+0x4bc/0x870
 ret_from_fork_asm+0x1a/0x30

Freed by task 5869:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x46/0x50
 __kasan_slab_free+0x5c/0x80
 kfree+0x19a/0x6d0
 xpad_disconnect+0x350/0x480
 usb_unbind_interface+0x26e/0x910
 device_release_driver_internal+0x4d9/0x800
 bus_remove_device+0x34d/0x410
 device_del+0x511/0x8e0
 usb_disable_device+0x3e9/0x8a0
 usb_disconnect+0x330/0x950
 hub_event+0x1cf5/0x4a20
 process_scheduled_works+0xae1/0x17b0
 worker_thread+0x8a0/0xda0
 kthread+0x711/0x8a0
 ret_from_fork+0x4bc/0x870
 ret_from_fork_asm+0x1a/0x30

The buggy address belongs to the object at ffff8881765c6000
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 92 bytes inside of
 freed 1024-byte region [ffff8881765c6000, ffff8881765c6400)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1765c0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x57ff00000000040(head|node=1|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 057ff00000000040 ffff888100041dc0 ffffea0005d08200 dead000000000002
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 057ff00000000040 ffff888100041dc0 ffffea0005d08200 dead000000000002
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 057ff00000000003 ffffea0005d97001 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5695, tgid 5695 (dhcpcd-run-hook), ts 37668658175, free_ts 32622665866
 post_alloc_hook+0x240/0x2a0
 get_page_from_freelist+0x2365/0x2440
 __alloc_frozen_pages_noprof+0x181/0x370
 alloc_pages_mpol+0x232/0x4a0
 allocate_slab+0x96/0x350
 ___slab_alloc+0xf56/0x1990
 __slab_alloc+0x65/0x100
 __kmalloc_noprof+0x47d/0x800
 load_elf_phdrs+0x13e/0x230
 load_elf_binary+0x959/0x2740
 bprm_execve+0x99c/0x1450
 do_execveat_common+0x510/0x6a0
 __x64_sys_execve+0x94/0xb0
 do_syscall_64+0xfa/0xfa0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5272 tgid 5272 stack trace:
 __free_frozen_pages+0xbc8/0xd30
 __put_partials+0x146/0x170
 put_cpu_partial+0x1f2/0x2e0
 __slab_free+0x2b9/0x390
 qlist_free_all+0x97/0x140
 kasan_quarantine_reduce+0x148/0x160
 __kasan_slab_alloc+0x22/0x80
 __kmalloc_noprof+0x3cf/0x800
 tomoyo_realpath_from_path+0xe3/0x5d0
 tomoyo_path_perm+0x213/0x4b0
 security_inode_getattr+0x12f/0x330
 vfs_fstatat+0xb1/0x170
 __x64_sys_newfstatat+0x116/0x190
 do_syscall_64+0xfa/0xfa0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff8881765c5f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8881765c5f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8881765c6000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                    ^
 ffff8881765c6080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881765c6100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
