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 debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline]
BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x271/0x2c0 kernel/locking/spinlock_debug.c:115
Read of size 4 at addr ffff88811d80885c by task modprobe/4915
CPU: 1 PID: 4915 Comm: modprobe Not tainted 6.10.0-rc4-syzkaller-00097-g2ea6d07efe53 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline]
do_raw_spin_lock+0x271/0x2c0 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:105 [inline]
__wake_up+0x1c/0x60 kernel/sched/wait.c:127
__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+0x3b7/0x6e0 drivers/usb/core/hcd.c:1653
usb_hcd_giveback_urb+0x396/0x450 drivers/usb/core/hcd.c:1734
dummy_timer+0x17f6/0x3900 drivers/usb/gadget/udc/dummy_hcd.c:1987
__run_hrtimer kernel/time/hrtimer.c:1687 [inline]
__hrtimer_run_queues+0x20c/0xcc0 kernel/time/hrtimer.c:1751
hrtimer_interrupt+0x31b/0x800 kernel/time/hrtimer.c:1813
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline]
__sysvec_apic_timer_interrupt+0x10f/0x450 arch/x86/kernel/apic/apic.c:1049
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0x8b/0xb0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:finish_task_switch.isra.0+0x1e5/0xa40 kernel/sched/core.c:5282
Code: 0f 85 ad 07 00 00 8b 0d 21 f3 96 08 85 c9 0f 85 cb 02 00 00 48 89 df e8 59 8a 6d 05 e8 74 a2 33 00 fb 65 48 8b 1d 0b e7 dc 7e <48> 8d bb 30 15 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1
RSP: 0018:ffffc9000cc3fd80 EFLAGS: 00000206
RAX: 0000000000001487 RBX: ffff888104ff0000 RCX: 1ffffffff137b111
RDX: 0000000000000000 RSI: ffffffff86c7d6e0 RDI: ffffffff86e77840
RBP: ffffc9000cc3fdc8 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff89bdc217 R11: 0000000000000000 R12: ffff8881f653d898
R13: ffff8881016a5700 R14: ffff88811c5bae40 R15: ffff8881f653d898
context_switch kernel/sched/core.c:5411 [inline]
__schedule+0xcae/0x3170 kernel/sched/core.c:6745
__schedule_loop kernel/sched/core.c:6822 [inline]
schedule+0xe7/0x350 kernel/sched/core.c:6837
exit_to_user_mode_loop kernel/entry/common.c:102 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
irqentry_exit_to_user_mode+0xd5/0x240 kernel/entry/common.c:231
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
RIP: 0033:0x7fb4ec470124
Code: 53 48 83 ec 20 64 48 8b 04 25 28 00 00 00 48 89 44 24 18 31 c0 e8 dc fa ff ff 48 8d 15 81 d0 01 00 48 c7 44 24 08 00 00 00 00 <89> 02 48 8b 05 3b be 01 00 48 83 38 00 0f 85 eb 00 00 00 48 8d 3d
RSP: 002b:00007ffcb4b7dae0 EFLAGS: 00010206
RAX: 0000000000001000 RBX: 00007fb4ec48b4f8 RCX: 0000000000000002
RDX: 00007fb4ec48d19c RSI: 00007ffcb4b7dbb8 RDI: 000000000000001e
RBP: 00007fb4ec48b4f0 R08: 0000000000000000 R09: 000000000000000d
R10: 00007ffcb4b7d7f0 R11: 0000000000000246 R12: 0000000000000004
R13: 00007ffcb4b7dbb8 R14: 00007ffcb4b7dbe0 R15: 0000000000000000
Allocated by task 37:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:370 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:387
kmalloc_noprof include/linux/slab.h:660 [inline]
kzalloc_noprof include/linux/slab.h:778 [inline]
xpad_probe+0x27e/0x1f50 drivers/input/joystick/xpad.c:2025
usb_probe_interface+0x309/0x9d0 drivers/usb/core/driver.c:399
call_driver_probe drivers/base/dd.c:578 [inline]
really_probe+0x23e/0xa90 drivers/base/dd.c:656
__driver_probe_device+0x1de/0x440 drivers/base/dd.c:798
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:828
__device_attach_driver+0x1df/0x310 drivers/base/dd.c:956
bus_for_each_drv+0x157/0x1e0 drivers/base/bus.c:457
__device_attach+0x1e8/0x4b0 drivers/base/dd.c:1028
bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532
device_add+0x114b/0x1a70 drivers/base/core.c:3679
usb_set_configuration+0x10cb/0x1c50 drivers/usb/core/message.c:2210
usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:254
usb_probe_device+0xec/0x3e0 drivers/usb/core/driver.c:294
call_driver_probe drivers/base/dd.c:578 [inline]
really_probe+0x23e/0xa90 drivers/base/dd.c:656
__driver_probe_device+0x1de/0x440 drivers/base/dd.c:798
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:828
__device_attach_driver+0x1df/0x310 drivers/base/dd.c:956
bus_for_each_drv+0x157/0x1e0 drivers/base/bus.c:457
__device_attach+0x1e8/0x4b0 drivers/base/dd.c:1028
bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532
device_add+0x114b/0x1a70 drivers/base/core.c:3679
usb_new_device+0xd90/0x1a10 drivers/usb/core/hub.c:2651
hub_port_connect drivers/usb/core/hub.c:5521 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5661 [inline]
port_event drivers/usb/core/hub.c:5821 [inline]
hub_event+0x2e66/0x4f50 drivers/usb/core/hub.c:5903
process_one_work+0x9fb/0x1b60 kernel/workqueue.c:3231
process_scheduled_works kernel/workqueue.c:3312 [inline]
worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 737:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object+0xf7/0x160 mm/kasan/common.c:240
__kasan_slab_free+0x14/0x30 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2196 [inline]
slab_free mm/slub.c:4437 [inline]
kfree+0x10b/0x380 mm/slub.c:4558
xpad_disconnect+0x1cf/0x580 drivers/input/joystick/xpad.c:2206
usb_unbind_interface+0x1e8/0x970 drivers/usb/core/driver.c:461
device_remove drivers/base/dd.c:568 [inline]
device_remove+0x122/0x170 drivers/base/dd.c:560
__device_release_driver drivers/base/dd.c:1270 [inline]
device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1293
bus_remove_device+0x22f/0x420 drivers/base/bus.c:574
device_del+0x396/0x9f0 drivers/base/core.c:3868
usb_disable_device+0x36c/0x7f0 drivers/usb/core/message.c:1418
usb_disconnect+0x2e1/0x920 drivers/usb/core/hub.c:2304
hub_port_connect drivers/usb/core/hub.c:5361 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5661 [inline]
port_event drivers/usb/core/hub.c:5821 [inline]
hub_event+0x1be4/0x4f50 drivers/usb/core/hub.c:5903
process_one_work+0x9fb/0x1b60 kernel/workqueue.c:3231
process_scheduled_works kernel/workqueue.c:3312 [inline]
worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff88811d808800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 92 bytes inside of
freed 1024-byte region [ffff88811d808800, ffff88811d808c00)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11d808
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0x200000000000040(head|node=0|zone=2)
page_type: 0xffffefff(slab)
raw: 0200000000000040 ffff888100041dc0 ffffea00047b0200 0000000000000003
raw: 0000000000000000 0000000000100010 00000001ffffefff 0000000000000000
head: 0200000000000040 ffff888100041dc0 ffffea00047b0200 0000000000000003
head: 0000000000000000 0000000000100010 00000001ffffefff 0000000000000000
head: 0200000000000003 ffffea0004760201 ffffffffffffffff 0000000000000000
head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000
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 4156, tgid 4156 (kworker/u8:3), ts 86515109777, free_ts 85027438373
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1468
prep_new_page mm/page_alloc.c:1476 [inline]
get_page_from_freelist+0x132e/0x2640 mm/page_alloc.c:3420
__alloc_pages_noprof+0x21e/0x2290 mm/page_alloc.c:4678
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x56/0x110 mm/slub.c:2265
allocate_slab mm/slub.c:2428 [inline]
new_slab+0x84/0x260 mm/slub.c:2481
___slab_alloc+0xdac/0x1870 mm/slub.c:3667
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3757
__slab_alloc_node mm/slub.c:3810 [inline]
slab_alloc_node mm/slub.c:3989 [inline]
__do_kmalloc_node mm/slub.c:4121 [inline]
__kmalloc_noprof+0x32b/0x3d0 mm/slub.c:4135
kmalloc_noprof include/linux/slab.h:664 [inline]
load_elf_phdrs+0x103/0x210 fs/binfmt_elf.c:526
load_elf_binary+0x1fe/0x4db0 fs/binfmt_elf.c:855
search_binary_handler fs/exec.c:1797 [inline]
exec_binprm fs/exec.c:1839 [inline]
bprm_execve fs/exec.c:1891 [inline]
bprm_execve+0x703/0x19a0 fs/exec.c:1867
kernel_execve+0x3cf/0x4e0 fs/exec.c:2058
call_usermodehelper_exec_async+0x255/0x4c0 kernel/umh.c:110
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
page last free pid 4090 tgid 4090 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1088 [inline]
free_unref_page+0x696/0xd40 mm/page_alloc.c:2583
__put_partials+0x14c/0x170 mm/slub.c:2995
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x4e/0x70 mm/kasan/common.c:322
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3941 [inline]
slab_alloc_node mm/slub.c:4001 [inline]
kmem_cache_alloc_noprof+0x11c/0x2b0 mm/slub.c:4008
getname_flags.part.0+0x50/0x4f0 fs/namei.c:139
getname_flags+0x9b/0xf0 include/linux/audit.h:322
vfs_fstatat+0x9a/0x150 fs/stat.c:303
__do_sys_newfstatat+0xa6/0x130 fs/stat.c:468
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88811d808700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88811d808780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88811d808800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88811d808880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88811d808900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 0f 85 ad 07 00 00 jne 0x7b3
6: 8b 0d 21 f3 96 08 mov 0x896f321(%rip),%ecx # 0x896f32d
c: 85 c9 test %ecx,%ecx
e: 0f 85 cb 02 00 00 jne 0x2df
14: 48 89 df mov %rbx,%rdi
17: e8 59 8a 6d 05 call 0x56d8a75
1c: e8 74 a2 33 00 call 0x33a295
21: fb sti
22: 65 48 8b 1d 0b e7 dc mov %gs:0x7edce70b(%rip),%rbx # 0x7edce735
29: 7e
* 2a: 48 8d bb 30 15 00 00 lea 0x1530(%rbx),%rdi <-- trapping instruction
31: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
38: fc ff df
3b: 48 89 fa mov %rdi,%rdx
3e: 48 rex.W
3f: c1 .byte 0xc1