xpad 3-1:179.65: xpad_irq_in - usb_submit_urb failed with result -19
xpad 3-1:179.65: xpad_irq_out - usb_submit_urb failed with result -19
==================================================================
BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x28b/0x2f0
Read of size 4 at addr ffff8881bc0a985c by task syz.1.848/9130

CPU: 1 UID: 0 PID: 9130 Comm: syz.1.848 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
Call Trace:
 <IRQ>
 dump_stack_lvl+0xe8/0x150
 print_address_description+0x55/0x1e0
 print_report+0x58/0x70
 kasan_report+0x117/0x150
 do_raw_spin_lock+0x28b/0x2f0
 _raw_spin_lock_irqsave+0x4c/0x60
 __wake_up_common_lock+0x2f/0x1f0
 __usb_hcd_giveback_urb+0x3b0/0x540
 dummy_timer+0xbc0/0x4650
 __hrtimer_run_queues+0x3c0/0xa20
 hrtimer_run_softirq+0x17a/0x240
 handle_softirqs+0x22a/0x840
 __irq_exit_rcu+0xca/0x220
 irq_exit_rcu+0x9/0x30
 sysvec_apic_timer_interrupt+0xa6/0xc0
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x1a/0x20
RIP: 0010:lock_is_held_type+0x106/0x150
Code: 19 00 00 b8 ff ff ff ff 65 0f c1 05 74 8d 90 07 83 f8 01 75 25 9c 58 a9 00 02 00 00 75 39 41 f7 c4 00 02 00 00 74 01 fb 89 d8 <5b> 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc cc 90 0f 0b 90 48 c7
RSP: 0000:ffffc900035b72e0 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 0000000000000001 RCX: 0000000080000001
RDX: 0000000000000000 RSI: ffffffff8e21d6f5 RDI: ffffffff8c28b0e0
RBP: 00000000ffffffff R08: ffffffff823cb264 R09: ffffffff8e95cd60
R10: dffffc0000000000 R11: fffff94000091899 R12: 0000000000000246
R13: ffff8881093b5880 R14: ffffffff8e95cd60 R15: 0000000000000001
 page_ext_lookup+0xe7/0x180
 page_table_check_clear+0x212/0x4f0
 __zap_vma_range+0x3641/0x4b40
 unmap_vmas+0x379/0x530
 exit_mmap+0x280/0x9e0
 __mmput+0x118/0x430
 exit_mm+0x18e/0x250
 do_exit+0x6a2/0x22c0
 do_group_exit+0x21b/0x2d0
 get_signal+0x1284/0x1330
 arch_do_signal_or_restart+0xbc/0x840
 exit_to_user_mode_loop+0x8c/0x4d0
 do_syscall_64+0x33e/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff8be59cdd9
Code: Unable to access opcode bytes at 0x7ff8be59cdaf.
RSP: 002b:00007ff8bf4a7028 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: 000000000000000b RBX: 00007ff8be815fa0 RCX: 00007ff8be59cdd9
RDX: 0000000000000651 RSI: 0000200000000000 RDI: 0000000000000005
RBP: 00007ff8be632d69 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ff8be816038 R14: 00007ff8be815fa0 R15: 00007ffcdd7f6ad8
 </TASK>

Allocated by task 5678:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_cache_noprof+0x31c/0x660
 xpad_probe+0x428/0x1fc0
 usb_probe_interface+0x659/0xc70
 really_probe+0x267/0xaf0
 __driver_probe_device+0x1ef/0x380
 driver_probe_device+0x4f/0x240
 __device_attach_driver+0x279/0x430
 bus_for_each_drv+0x258/0x2f0
 __device_attach+0x2c5/0x450
 device_initial_probe+0xa1/0xd0
 bus_probe_device+0x12a/0x220
 device_add+0x7e9/0xbb0
 usb_set_configuration+0x1a87/0x2110
 usb_generic_driver_probe+0x8d/0x150
 usb_probe_device+0x1c4/0x3b0
 really_probe+0x267/0xaf0
 __driver_probe_device+0x1ef/0x380
 driver_probe_device+0x4f/0x240
 __device_attach_driver+0x279/0x430
 bus_for_each_drv+0x258/0x2f0
 __device_attach+0x2c5/0x450
 device_initial_probe+0xa1/0xd0
 bus_probe_device+0x12a/0x220
 device_add+0x7e9/0xbb0
 usb_new_device+0xa08/0x16f0
 hub_event+0x2a1c/0x4f30
 process_scheduled_works+0xb5d/0x1860
 worker_thread+0xa53/0xfc0
 kthread+0x388/0x470
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Freed by task 855:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x46/0x50
 __kasan_slab_free+0x5c/0x80
 kfree+0x1c5/0x640
 xpad_disconnect+0x350/0x480
 usb_unbind_interface+0x26e/0x910
 device_release_driver_internal+0x4d9/0x870
 bus_remove_device+0x455/0x570
 device_del+0x527/0x8f0
 usb_disable_device+0x3d4/0x8d0
 usb_disconnect+0x32f/0x990
 hub_event+0x1cc9/0x4f30
 process_scheduled_works+0xb5d/0x1860
 worker_thread+0xa53/0xfc0
 kthread+0x388/0x470
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

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

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1bc0a8
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 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 057ff00000000040 ffff888100041dc0 dead000000000100 dead000000000122
head: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 057ff00000000003 fffffffffffffe01 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 796, tgid 796 (kworker/1:2), ts 68916352086, free_ts 56167348913
 post_alloc_hook+0x2a8/0x300
 get_page_from_freelist+0x2866/0x29f0
 __alloc_frozen_pages_noprof+0x194/0x380
 allocate_slab+0x7e/0x670
 refill_objects+0x339/0x3d0
 __pcs_replace_empty_main+0x321/0x720
 __kmalloc_noprof+0x474/0x760
 ___neigh_create+0x6d5/0x2250
 ip6_finish_output2+0x729/0x13e0
 ip6_output+0x340/0x550
 NF_HOOK+0x177/0x4f0
 mld_sendpack+0x8b4/0xe40
 mld_ifc_work+0x835/0xe70
 process_scheduled_works+0xb5d/0x1860
 worker_thread+0xa53/0xfc0
 kthread+0x388/0x470
page last free pid 5557 tgid 5557 stack trace:
 __free_frozen_pages+0xc71/0xe00
 __slab_free+0x274/0x2c0
 qlist_free_all+0x99/0x100
 kasan_quarantine_reduce+0x148/0x160
 __kasan_slab_alloc+0x22/0x80
 __kmalloc_noprof+0x316/0x760
 load_elf_binary+0x30f/0x2980
 bprm_execve+0x94a/0x1510
 do_execveat_common+0x50d/0x690
 __x64_sys_execve+0x97/0xc0
 do_syscall_64+0x15f/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff8881bc0a9700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8881bc0a9780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8881bc0a9800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                    ^
 ffff8881bc0a9880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881bc0a9900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
