xpad 9-1:179.65: xpad_irq_in - usb_submit_urb failed with result -19
xpad 9-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 ffff888109f2f85c by task kworker/u10:4/22429

CPU: 1 UID: 0 PID: 22429 Comm: kworker/u10:4 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+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+0x862/0x4550
 __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:unwind_next_frame+0x15d/0x2390
Code: 5d 00 48 85 db 74 23 48 81 c3 88 00 00 00 48 89 d8 48 c1 e8 03 0f b6 04 28 84 c0 0f 85 45 1b 00 00 f6 03 03 0f 85 e4 17 00 00 <49> 8d 5e 35 48 89 d8 48 c1 e8 03 48 89 44 24 28 0f b6 04 28 84 c0
RSP: 0018:ffffc90006f770f8 EFLAGS: 00000246
RAX: 1ffff92000deee43 RBX: 0000000000000000 RCX: 76ee30d4f93d9a00
RDX: 0000000000000001 RSI: ffffffff8be33660 RDI: ffffffff8be33620
RBP: dffffc0000000000 R08: 0000000000000000 R09: ffffffff8172c195
R10: ffffc90006f77218 R11: ffffffff81ac3820 R12: 1ffff92000deee39
R13: ffffc90006f77218 R14: ffffc90006f771c8 R15: ffffffff8172c195
 arch_stack_walk+0x11c/0x150
 stack_trace_save+0x9c/0xe0
 kasan_save_stack+0x3e/0x60
 kasan_record_aux_stack+0xbd/0xd0
 call_rcu+0x157/0x9c0
 kmem_cache_free+0x309/0x400
 __fput_deferred+0x227/0x390
 fput_close+0x119/0x200
 path_openat+0x313c/0x3830
 do_filp_open+0x1fa/0x410
 do_open_execat+0x135/0x560
 alloc_bprm+0x28/0x5c0
 kernel_execve+0x9b/0x9f0
 call_usermodehelper_exec_async+0x210/0x360
 ret_from_fork+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 47:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_cache_noprof+0x230/0x3d0
 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+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30

Freed by task 5880:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x46/0x50
 __kasan_slab_free+0x5b/0x80
 kfree+0x18e/0x440
 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+0x3fc/0x770
 ret_from_fork_asm+0x1a/0x30

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

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109f28
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0x57ff00000000040(head|node=1|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 057ff00000000040 ffff88801a441dc0 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 057ff00000000040 ffff88801a441dc0 0000000000000000 dead000000000001
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 057ff00000000003 ffffea000427ca01 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5854, tgid 5854 (syz-executor), ts 56343784226, free_ts 55979634427
 post_alloc_hook+0x240/0x2a0
 get_page_from_freelist+0x21e4/0x22c0
 __alloc_frozen_pages_noprof+0x181/0x370
 alloc_pages_mpol+0x232/0x4a0
 allocate_slab+0x8a/0x370
 ___slab_alloc+0xbeb/0x1410
 __kmalloc_noprof+0x305/0x4f0
 batadv_hash_new+0x7b/0x290
 batadv_nc_mesh_init+0x13c/0x3c0
 batadv_mesh_init+0x412/0x700
 batadv_meshif_init_late+0xa3a/0xee0
 register_netdevice+0x6bf/0x1ae0
 rtnl_newlink_create+0x310/0xb00
 rtnl_newlink+0x16d6/0x1c70
 rtnetlink_rcv_msg+0x7cf/0xb70
 netlink_rcv_skb+0x208/0x470
page last free pid 5845 tgid 5845 stack trace:
 __free_frozen_pages+0xbc4/0xd30
 __folio_put+0x21b/0x2c0
 skb_release_data+0x49a/0x7c0
 napi_consume_skb+0x158/0x1e0
 net_rx_action+0x51b/0xe30
 handle_softirqs+0x286/0x870
 __irq_exit_rcu+0xca/0x1f0
 irq_exit_rcu+0x9/0x30
 common_interrupt+0xbb/0xe0
 asm_common_interrupt+0x26/0x40

Memory state around the buggy address:
 ffff888109f2f700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888109f2f780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888109f2f800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                    ^
 ffff888109f2f880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888109f2f900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
