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 debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline]
BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x26f/0x2b0 kernel/locking/spinlock_debug.c:115
Read of size 4 at addr ffff88810bf1585c by task modprobe/6862
CPU: 0 UID: 0 PID: 6862 Comm: modprobe Not tainted syzkaller #0 PREEMPT(voluntary)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xcd/0x630 mm/kasan/report.c:482
kasan_report+0xe0/0x110 mm/kasan/report.c:595
debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline]
do_raw_spin_lock+0x26f/0x2b0 kernel/locking/spinlock_debug.c:115
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
_raw_spin_lock_irqsave+0x42/0x60 kernel/locking/spinlock.c:162
__wake_up_common_lock kernel/sched/wait.c:124 [inline]
__wake_up+0x1c/0x60 kernel/sched/wait.c:146
__usb_unanchor_urb drivers/usb/core/urb.c:156 [inline]
usb_anchor_resume_wakeups+0xc2/0xe0 drivers/usb/core/urb.c:150
__usb_hcd_giveback_urb+0x3d5/0x610 drivers/usb/core/hcd.c:1664
usb_hcd_giveback_urb+0x39b/0x450 drivers/usb/core/hcd.c:1745
dummy_timer+0x1809/0x3ad0 drivers/usb/gadget/udc/dummy_hcd.c:1995
__run_hrtimer kernel/time/hrtimer.c:1777 [inline]
__hrtimer_run_queues+0x202/0xc40 kernel/time/hrtimer.c:1841
hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1858
handle_softirqs+0x208/0x940 kernel/softirq.c:622
__do_softirq kernel/softirq.c:656 [inline]
invoke_softirq kernel/softirq.c:496 [inline]
__irq_exit_rcu+0xfa/0x160 kernel/softirq.c:723
irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1056 [inline]
sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1056
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697
RIP: 0010:__kmem_cache_alloc_bulk+0x36f/0x6c0 mm/slub.c:7450
Code: 07 36 82 ff 8b 05 25 1c cb 08 85 c0 0f 85 ba 00 00 00 c6 43 30 00 4d 85 ff 0f 85 c8 00 00 00 9c 58 f6 c4 02 0f 85 31 02 00 00 01 00 00 00 e8 f7 db 75 ff 65 8b 05 b0 3d c9 0a 85 c0 0f 84 8c
RSP: 0018:ffffc900154bf3c8 EFLAGS: 00000246
RAX: 0000000000000002 RBX: ffff8881f563f630 RCX: 0000000000000006
RDX: 0000000000000000 RSI: ffffffff88d04073 RDI: ffffffff878a7380
RBP: 0000000000000020 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff8aa491d7 R11: 0000000000000200 R12: 0000000000000000
R13: ffff88810129db40 R14: ffff88810129db40 R15: 0000000000000200
refill_sheaf mm/slub.c:2650 [inline]
alloc_full_sheaf mm/slub.c:2671 [inline]
__pcs_replace_empty_main+0x2b2/0x4e0 mm/slub.c:5033
alloc_from_pcs mm/slub.c:5121 [inline]
slab_alloc_node mm/slub.c:5248 [inline]
kmem_cache_alloc_noprof+0x58d/0x740 mm/slub.c:5270
vm_area_dup+0x25/0x6c0 mm/vma_init.c:123
__split_vma+0x18e/0x1020 mm/vma.c:508
vms_gather_munmap_vmas+0x1cb/0x12c0 mm/vma.c:1362
do_vmi_align_munmap+0x286/0x7e0 mm/vma.c:1530
do_vmi_munmap+0x204/0x3e0 mm/vma.c:1587
__vm_munmap+0x196/0x370 mm/vma.c:3203
elf_map fs/binfmt_elf.c:397 [inline]
elf_load+0x349/0x780 fs/binfmt_elf.c:422
load_elf_binary+0x13b7/0x4ef0 fs/binfmt_elf.c:1188
search_binary_handler fs/exec.c:1669 [inline]
exec_binprm fs/exec.c:1701 [inline]
bprm_execve fs/exec.c:1753 [inline]
bprm_execve+0x8c7/0x15e0 fs/exec.c:1729
kernel_execve+0x2ef/0x3b0 fs/exec.c:1919
call_usermodehelper_exec_async+0x255/0x4c0 kernel/umh.c:109
ret_from_fork+0x74f/0xa30 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
Allocated by task 9:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
kasan_save_track+0x14/0x30 mm/kasan/common.c:77
poison_kmalloc_redzone mm/kasan/common.c:397 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:414
kmalloc_noprof include/linux/slab.h:957 [inline]
kzalloc_noprof include/linux/slab.h:1094 [inline]
xpad_probe+0x286/0x1ff0 drivers/input/joystick/xpad.c:2080
usb_probe_interface+0x303/0xa80 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xb20 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x470 drivers/base/dd.c:801
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831
__device_attach_driver+0x1df/0x350 drivers/base/dd.c:959
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4e0 drivers/base/dd.c:1031
device_initial_probe+0xaa/0xc0 drivers/base/dd.c:1086
bus_probe_device+0x64/0x150 drivers/base/bus.c:574
device_add+0x116e/0x1980 drivers/base/core.c:3689
usb_set_configuration+0x1187/0x1e50 drivers/usb/core/message.c:2210
usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:250
usb_probe_device+0xef/0x400 drivers/usb/core/driver.c:291
call_driver_probe drivers/base/dd.c:581 [inline]
really_probe+0x241/0xb20 drivers/base/dd.c:659
__driver_probe_device+0x1de/0x470 drivers/base/dd.c:801
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:831
__device_attach_driver+0x1df/0x350 drivers/base/dd.c:959
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4e0 drivers/base/dd.c:1031
device_initial_probe+0xaa/0xc0 drivers/base/dd.c:1086
bus_probe_device+0x64/0x150 drivers/base/bus.c:574
device_add+0x116e/0x1980 drivers/base/core.c:3689
usb_new_device+0xd07/0x1a90 drivers/usb/core/hub.c:2695
hub_port_connect drivers/usb/core/hub.c:5567 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5707 [inline]
port_event drivers/usb/core/hub.c:5871 [inline]
hub_event+0x31bf/0x5420 drivers/usb/core/hub.c:5953
process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257
process_scheduled_works kernel/workqueue.c:3340 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421
kthread+0x3c5/0x780 kernel/kthread.c:463
ret_from_fork+0x74f/0xa30 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
Freed by task 38:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
kasan_save_track+0x14/0x30 mm/kasan/common.c:77
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:252 [inline]
__kasan_slab_free+0x43/0x70 mm/kasan/common.c:284
kasan_slab_free include/linux/kasan.h:234 [inline]
slab_free_hook mm/slub.c:2540 [inline]
slab_free mm/slub.c:6670 [inline]
kfree+0x2c8/0x680 mm/slub.c:6878
xpad_disconnect+0x1cf/0x580 drivers/input/joystick/xpad.c:2264
usb_unbind_interface+0x1dd/0x9e0 drivers/usb/core/driver.c:458
device_remove drivers/base/dd.c:571 [inline]
device_remove+0x125/0x170 drivers/base/dd.c:563
__device_release_driver drivers/base/dd.c:1282 [inline]
device_release_driver_internal+0x44b/0x620 drivers/base/dd.c:1305
bus_remove_device+0x22f/0x450 drivers/base/bus.c:616
device_del+0x396/0x9f0 drivers/base/core.c:3878
usb_disable_device+0x355/0x820 drivers/usb/core/message.c:1418
usb_disconnect+0x2e1/0x9e0 drivers/usb/core/hub.c:2345
hub_port_connect drivers/usb/core/hub.c:5407 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5707 [inline]
port_event drivers/usb/core/hub.c:5871 [inline]
hub_event+0x1b50/0x5420 drivers/usb/core/hub.c:5953
process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257
process_scheduled_works kernel/workqueue.c:3340 [inline]
worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421
kthread+0x3c5/0x780 kernel/kthread.c:463
ret_from_fork+0x74f/0xa30 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
The buggy address belongs to the object at ffff88810bf15800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 92 bytes inside of
freed 1024-byte region [ffff88810bf15800, ffff88810bf15c00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10bf10
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0x200000000000040(head|node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000040 ffff888100041dc0 ffffea00042bea00 dead000000000003
raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
head: 0200000000000040 ffff888100041dc0 ffffea00042bea00 dead000000000003
head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
head: 0200000000000003 ffffea00042fc401 00000000ffffffff 00000000ffffffff
head: 0000000000000000 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 3409, tgid 3409 (kworker/u8:15), ts 57029748175, free_ts 57001986630
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1846
prep_new_page mm/page_alloc.c:1854 [inline]
get_page_from_freelist+0x1058/0x3cb0 mm/page_alloc.c:3915
__alloc_frozen_pages_noprof+0x259/0x21c0 mm/page_alloc.c:5210
alloc_pages_mpol+0xe4/0x410 mm/mempolicy.c:2486
alloc_slab_page mm/slub.c:3075 [inline]
allocate_slab mm/slub.c:3248 [inline]
new_slab+0x2c3/0x430 mm/slub.c:3302
___slab_alloc+0xe20/0x1ca0 mm/slub.c:4656
__slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4779
__slab_alloc_node mm/slub.c:4855 [inline]
slab_alloc_node mm/slub.c:5251 [inline]
__do_kmalloc_node mm/slub.c:5656 [inline]
__kmalloc_noprof+0x4c6/0x8d0 mm/slub.c:5669
kmalloc_noprof include/linux/slab.h:961 [inline]
load_elf_phdrs+0x102/0x210 fs/binfmt_elf.c:540
load_elf_binary+0x149c/0x4ef0 fs/binfmt_elf.c:969
search_binary_handler fs/exec.c:1669 [inline]
exec_binprm fs/exec.c:1701 [inline]
bprm_execve fs/exec.c:1753 [inline]
bprm_execve+0x8c7/0x15e0 fs/exec.c:1729
kernel_execve+0x2ef/0x3b0 fs/exec.c:1919
call_usermodehelper_exec_async+0x255/0x4c0 kernel/umh.c:109
ret_from_fork+0x74f/0xa30 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
page last free pid 2972 tgid 2972 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0x795/0x1010 mm/page_alloc.c:2943
discard_slab mm/slub.c:3346 [inline]
__put_partials+0x130/0x170 mm/slub.c:3886
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4c/0xf0 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x4e/0x70 mm/kasan/common.c:349
kasan_slab_alloc include/linux/kasan.h:252 [inline]
slab_post_alloc_hook mm/slub.c:4953 [inline]
slab_alloc_node mm/slub.c:5263 [inline]
kmem_cache_alloc_lru_noprof+0x272/0x750 mm/slub.c:5282
__d_alloc+0x35/0xa80 fs/dcache.c:1730
d_alloc_pseudo+0x1c/0xc0 fs/dcache.c:1861
alloc_path_pseudo fs/file_table.c:363 [inline]
alloc_file_pseudo+0xcf/0x230 fs/file_table.c:379
sock_alloc_file+0x50/0x210 net/socket.c:483
sock_map_fd net/socket.c:513 [inline]
__sys_socket+0x1c0/0x260 net/socket.c:1756
__do_sys_socket net/socket.c:1761 [inline]
__se_sys_socket net/socket.c:1759 [inline]
__x64_sys_socket+0x72/0xb0 net/socket.c:1759
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x570 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88810bf15700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88810bf15780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88810bf15800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88810bf15880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88810bf15900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 36 82 ss (bad)
2: ff 8b 05 25 1c cb decl -0x34e3dafb(%rbx)
8: 08 85 c0 0f 85 ba or %al,-0x457af040(%rbp)
e: 00 00 add %al,(%rax)
10: 00 c6 add %al,%dh
12: 43 30 00 rex.XB xor %al,(%r8)
15: 4d 85 ff test %r15,%r15
18: 0f 85 c8 00 00 00 jne 0xe6
1e: 9c pushf
1f: 58 pop %rax
20: f6 c4 02 test $0x2,%ah
23: 0f 85 31 02 00 00 jne 0x25a
* 29: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction
2e: e8 f7 db 75 ff call 0xff75dc2a
33: 65 8b 05 b0 3d c9 0a mov %gs:0xac93db0(%rip),%eax # 0xac93dea
3a: 85 c0 test %eax,%eax
3c: 0f .byte 0xf
3d: 84 .byte 0x84
3e: 8c .byte 0x8c