xpad 5-1:179.65: xpad_irq_in - usb_submit_urb failed with result -19
xpad 5-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+0x23a/0x260 kernel/locking/spinlock_debug.c:115
Read of size 4 at addr ffff888121ff785c by task pr/ttyS0/30
CPU: 0 UID: 0 PID: 30 Comm: pr/ttyS0 Not tainted syzkaller #0 PREEMPT(lazy)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/07/2026
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0x13d/0x4b0 mm/kasan/report.c:482
kasan_report+0xdf/0x1c0 mm/kasan/report.c:595
debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline]
do_raw_spin_lock+0x23a/0x260 kernel/locking/spinlock_debug.c:115
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:156 [inline]
_raw_spin_lock_irqsave+0x42/0x60 kernel/locking/spinlock.c:181
__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:155 [inline]
usb_anchor_resume_wakeups+0xc7/0xf0 drivers/usb/core/urb.c:149
__usb_hcd_giveback_urb+0x3d8/0x610 drivers/usb/core/hcd.c:1660
usb_hcd_giveback_urb+0x3ca/0x4a0 drivers/usb/core/hcd.c:1741
dummy_timer+0xdb5/0x3840 drivers/usb/gadget/udc/dummy_hcd.c:2051
__run_hrtimer kernel/time/hrtimer.c:2079 [inline]
__hrtimer_run_queues+0x448/0x9a0 kernel/time/hrtimer.c:2136
hrtimer_run_softirq+0x1ca/0x360 kernel/time/hrtimer.c:2153
handle_softirqs+0x209/0xa00 kernel/softirq.c:669
__do_softirq kernel/softirq.c:703 [inline]
invoke_softirq kernel/softirq.c:542 [inline]
__irq_exit_rcu+0x17a/0x220 kernel/softirq.c:786
irq_exit_rcu+0x9/0x30 kernel/softirq.c:809
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1062 [inline]
sysvec_apic_timer_interrupt+0x8f/0xb0 arch/x86/kernel/apic/apic.c:1062
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:674
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:211 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0x31/0x80 kernel/locking/spinlock.c:221
Code: f5 53 48 8b 74 24 10 48 89 fb 48 83 c7 18 e8 16 b9 f4 f9 48 89 df e8 9e 0f f5 f9 f7 c5 00 02 00 00 75 23 9c 58 f6 c4 02 75 37 01 00 00 00 e8 e5 40 e7 f9 65 48 83 3d 54 37 8e 05 00 74 16 5b
RSP: 0018:ffffc90000207cb0 EFLAGS: 00000246
RAX: 0000000000000006 RBX: ffffffff94511ca0 RCX: 0000000000000000
RDX: 0000000000000001 RSI: ffffffff89306960 RDI: ffffffff87d36a00
RBP: 0000000000000246 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 205d323232355420 R12: 1ffff92000040f99
R13: ffffffff89ed3440 R14: 0000000000000001 R15: dffffc0000000000
nbcon_emit_one+0x15c/0x2b0 kernel/printk/nbcon.c:1165
nbcon_kthread_func+0x5ef/0x7f0 kernel/printk/nbcon.c:1271
kthread+0x373/0x450 kernel/kthread.c:436
ret_from_fork+0x69f/0xc90 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Allocated by task 11:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:409 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:426
kasan_kmalloc include/linux/kasan.h:263 [inline]
__kmalloc_cache_noprof+0x2d8/0x680 mm/slub.c:5680
_kmalloc_noprof include/linux/slab.h:991 [inline]
_kzalloc_noprof include/linux/slab.h:1312 [inline]
xpad_probe+0x28e/0x1f60 drivers/input/joystick/xpad.c:2073
usb_probe_interface+0x386/0x980 drivers/usb/core/driver.c:399
call_driver_probe drivers/base/dd.c:629 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:707
__driver_probe_device+0x210/0x460 drivers/base/dd.c:869
driver_probe_device+0x4a/0x140 drivers/base/dd.c:899
__device_attach_driver+0x1df/0x320 drivers/base/dd.c:1027
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4c0 drivers/base/dd.c:1131
device_initial_probe+0xaf/0xf0 drivers/base/dd.c:1190
__bus_probe_device+0x60/0x160 drivers/base/bus.c:614
device_add+0x121d/0x1970 drivers/base/core.c:3778
usb_set_configuration+0xd97/0x1dc0 drivers/usb/core/message.c:2280
usb_generic_driver_probe+0xa1/0xe0 drivers/usb/core/generic.c:250
usb_probe_device+0xef/0x400 drivers/usb/core/driver.c:293
call_driver_probe drivers/base/dd.c:629 [inline]
really_probe+0x241/0xa60 drivers/base/dd.c:707
__driver_probe_device+0x210/0x460 drivers/base/dd.c:869
driver_probe_device+0x4a/0x140 drivers/base/dd.c:899
__device_attach_driver+0x1df/0x320 drivers/base/dd.c:1027
bus_for_each_drv+0x159/0x1e0 drivers/base/bus.c:500
__device_attach+0x1e4/0x4c0 drivers/base/dd.c:1131
device_initial_probe+0xaf/0xf0 drivers/base/dd.c:1190
__bus_probe_device+0x60/0x160 drivers/base/bus.c:614
device_add+0x121d/0x1970 drivers/base/core.c:3778
usb_new_device.part.0+0xcc2/0x1686 drivers/usb/core/hub.c:2713
usb_new_device drivers/usb/core/hub.c:5838 [inline]
hub_port_connect drivers/usb/core/hub.c:5585 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5725 [inline]
port_event drivers/usb/core/hub.c:5889 [inline]
hub_event.cold+0x51a/0xe9d drivers/usb/core/hub.c:5971
process_one_work+0xac7/0x1b10 kernel/workqueue.c:3495
process_scheduled_works kernel/workqueue.c:3578 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3659
kthread+0x373/0x450 kernel/kthread.c:436
ret_from_fork+0x69f/0xc90 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Freed by task 5654:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:264 [inline]
__kasan_slab_free+0x43/0x70 mm/kasan/common.c:296
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2780 [inline]
slab_free mm/slub.c:6630 [inline]
kfree+0x20c/0x650 mm/slub.c:6923
xpad_disconnect+0x1cf/0x530 drivers/input/joystick/xpad.c:2257
usb_unbind_interface+0x1dd/0x9b0 drivers/usb/core/driver.c:460
device_remove drivers/base/dd.c:619 [inline]
device_remove+0x12a/0x180 drivers/base/dd.c:611
__device_release_driver drivers/base/dd.c:1357 [inline]
device_release_driver_internal+0x441/0x610 drivers/base/dd.c:1380
bus_remove_device+0x2bc/0x560 drivers/base/bus.c:678
device_del+0x376/0x9b0 drivers/base/core.c:3967
usb_disable_device+0x367/0x810 drivers/usb/core/message.c:1484
usb_disconnect+0x2e2/0x9a0 drivers/usb/core/hub.c:2355
hub_port_connect drivers/usb/core/hub.c:5425 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5725 [inline]
port_event drivers/usb/core/hub.c:5889 [inline]
hub_event+0x1d46/0x4510 drivers/usb/core/hub.c:5971
process_one_work+0xac7/0x1b10 kernel/workqueue.c:3495
process_scheduled_works kernel/workqueue.c:3578 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3659
kthread+0x373/0x450 kernel/kthread.c:436
ret_from_fork+0x69f/0xc90 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
The buggy address belongs to the object at ffff888121ff7800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 92 bytes inside of
freed 1024-byte region [ffff888121ff7800, ffff888121ff7c00)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888121ff5800 pfn:0x121ff0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x200000000000240(workingset|head|node=0|zone=2)
page_type: f5(slab)
raw: 0200000000000240 ffff888100041dc0 ffff888100040888 ffffea00041bb210
raw: ffff888121ff5800 000000000010000b 00000000f5000000 0000000000000000
head: 0200000000000240 ffff888100041dc0 ffff888100040888 ffffea00041bb210
head: ffff888121ff5800 000000000010000b 00000000f5000000 0000000000000000
head: 0200000000000003 fffffffffffffe01 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 4237, tgid 4237 (kworker/u8:11), ts 63753815809
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1856
prep_new_page mm/page_alloc.c:1864 [inline]
get_page_from_freelist+0xf4b/0x3440 mm/page_alloc.c:3935
__alloc_frozen_pages_noprof+0x299/0x2d50 mm/page_alloc.c:5444
alloc_slab_page mm/slub.c:3384 [inline]
allocate_slab mm/slub.c:3499 [inline]
new_slab+0xb1/0x6d0 mm/slub.c:3550
refill_objects+0xe3/0x410 mm/slub.c:7539
refill_sheaf mm/slub.c:2917 [inline]
__pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4811
alloc_from_pcs mm/slub.c:4887 [inline]
slab_alloc_node mm/slub.c:5021 [inline]
__do_kmalloc_node mm/slub.c:5530 [inline]
__kmalloc_noprof+0x617/0x7e0 mm/slub.c:5556
_kmalloc_noprof include/linux/slab.h:995 [inline]
load_elf_phdrs+0x102/0x210 fs/binfmt_elf.c:537
load_elf_binary+0x1585/0x50e0 fs/binfmt_elf.c:969
search_binary_handler fs/exec.c:1777 [inline]
exec_binprm fs/exec.c:1809 [inline]
bprm_execve fs/exec.c:1865 [inline]
bprm_execve+0x8cb/0x17e0 fs/exec.c:1841
kernel_execve+0x31e/0x3a0 fs/exec.c:2009
call_usermodehelper_exec_async+0x239/0x4b0 kernel/umh.c:107
ret_from_fork+0x69f/0xc90 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
page last free pid 4233 tgid 4233 ts 63726823380 stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
__free_pages_prepare mm/page_alloc.c:1403 [inline]
__free_frozen_pages+0x714/0xfc0 mm/page_alloc.c:2954
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x4e/0x70 mm/kasan/common.c:361
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4720 [inline]
slab_alloc_node mm/slub.c:5033 [inline]
kmem_cache_alloc_noprof+0x264/0x650 mm/slub.c:5047
alloc_filename fs/namei.c:147 [inline]
do_getname+0x35/0x390 fs/namei.c:187
getname include/linux/fs.h:2566 [inline]
class_filename_constructor include/linux/fs.h:2593 [inline]
user_statfs+0x8c/0x1a0 fs/statfs.c:102
__do_sys_statfs+0x8d/0x100 fs/statfs.c:194
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x119/0x710 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff888121ff7700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888121ff7780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888121ff7800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888121ff7880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888121ff7900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: f5 cmc
1: 53 push %rbx
2: 48 8b 74 24 10 mov 0x10(%rsp),%rsi
7: 48 89 fb mov %rdi,%rbx
a: 48 83 c7 18 add $0x18,%rdi
e: e8 16 b9 f4 f9 call 0xf9f4b929
13: 48 89 df mov %rbx,%rdi
16: e8 9e 0f f5 f9 call 0xf9f50fb9
1b: f7 c5 00 02 00 00 test $0x200,%ebp
21: 75 23 jne 0x46
23: 9c pushf
24: 58 pop %rax
25: f6 c4 02 test $0x2,%ah
28: 75 37 jne 0x61
* 2a: bf 01 00 00 00 mov $0x1,%edi <-- trapping instruction
2f: e8 e5 40 e7 f9 call 0xf9e74119
34: 65 48 83 3d 54 37 8e cmpq $0x0,%gs:0x58e3754(%rip) # 0x58e3791
3b: 05 00
3d: 74 16 je 0x55
3f: 5b pop %rbx