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: use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline]
BUG: KASAN: use-after-free in do_raw_spin_lock+0x235/0x280 kernel/locking/spinlock_debug.c:114
Read of size 4 at addr ffff88805440685c by task udevd/19896
CPU: 1 PID: 19896 Comm: udevd Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
dump_stack_lvl+0x168/0x22e lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0xa8/0x210 mm/kasan/report.c:420
kasan_report+0x10b/0x140 mm/kasan/report.c:524
debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline]
do_raw_spin_lock+0x235/0x280 kernel/locking/spinlock_debug.c:114
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
_raw_spin_lock_irqsave+0xb0/0xf0 kernel/locking/spinlock.c:162
__wake_up_common_lock kernel/sched/wait.c:137 [inline]
__wake_up+0xf4/0x190 kernel/sched/wait.c:160
__usb_hcd_giveback_urb+0x396/0x520 drivers/usb/core/hcd.c:1678
dummy_timer+0x888/0x31b0 drivers/usb/gadget/udc/dummy_hcd.c:1994
__run_hrtimer kernel/time/hrtimer.c:1752 [inline]
__hrtimer_run_queues+0x554/0xd60 kernel/time/hrtimer.c:1816
hrtimer_run_softirq+0x183/0x2a0 kernel/time/hrtimer.c:1833
handle_softirqs+0x2a1/0x920 kernel/softirq.c:596
__do_softirq kernel/softirq.c:630 [inline]
invoke_softirq kernel/softirq.c:470 [inline]
__irq_exit_rcu+0x12f/0x220 kernel/softirq.c:679
irq_exit_rcu+0x5/0x20 kernel/softirq.c:691
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1118 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1118
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691
RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x60 kernel/kcov.c:212
Code: 2e 0f 1f 84 00 00 00 00 00 90 53 48 89 fb e8 17 00 00 00 48 8b 3d d0 a6 9e 0c 48 89 de 5b e9 37 58 4f 00 00 00 cc cc 00 00 cc <48> 8b 04 24 65 48 8b 0d a4 9e 81 7e 65 8b 15 a5 9e 81 7e 81 e2 00
RSP: 0018:ffffc9000410f518 EFLAGS: 00000286
RAX: ffffffff8a050644 RBX: 0000000000000000 RCX: ffff88802ad05940
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc9000410f6f0 R08: ffff88802ad05940 R09: 0000000000000004
R10: 0000000000000003 R11: 0000000000000000 R12: 000055b95a0d2fff
R13: ffffffff8bb15b61 R14: 0000000000000001 R15: 0000000000000002
mas_validate_gaps lib/maple_tree.c:6976 [inline]
mt_validate+0x2a09/0x4c90 lib/maple_tree.c:7244
validate_mm_mt+0xcd/0x420 mm/mmap.c:295
validate_mm+0xcc/0x2b0 mm/mmap.c:332
__vma_adjust+0x17e0/0x1c60 mm/mmap.c:879
vma_merge+0x882/0x9c0 mm/mmap.c:1072
mprotect_fixup+0x418/0x7f0 mm/mprotect.c:605
do_mprotect_pkey+0x754/0xa40 mm/mprotect.c:792
__do_sys_mprotect mm/mprotect.c:819 [inline]
__se_sys_mprotect mm/mprotect.c:816 [inline]
__x64_sys_mprotect+0x7c/0x90 mm/mprotect.c:816
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fd78631dfe7
Code: ef e8 3d fa ff ff 84 c0 75 b9 31 db 48 83 c4 08 48 89 d8 5b 5d 41 5c 41 5d 41 5e 41 5f c3 0f 1f 44 00 00 b8 0a 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e1 2d 0d 00 f7 d8 64 89 01 48
RSP: 002b:00007ffe9e246668 EFLAGS: 00000246 ORIG_RAX: 000000000000000a
RAX: ffffffffffffffda RBX: 0000000000000400 RCX: 00007fd78631dfe7
RDX: 0000000000000001 RSI: 0000000000000400 RDI: 00007fd786a7c000
RBP: 000055b98f6b6050 R08: 0000000000000000 R09: 0000000000000400
R10: 000055b98f6b60b0 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000004000 R14: 000055b98f6bba38 R15: 00007fd786bc039c
Allocated by task 4382:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
____kasan_kmalloc mm/kasan/common.c:374 [inline]
__kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:383
kmalloc include/linux/slab.h:563 [inline]
kzalloc include/linux/slab.h:699 [inline]
xpad_probe+0x41d/0x1d30 drivers/input/joystick/xpad.c:1969
usb_probe_interface+0x5a0/0xaf0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x2aa/0xc70 drivers/base/dd.c:639
__driver_probe_device+0x18c/0x330 drivers/base/dd.c:785
driver_probe_device+0x4f/0x420 drivers/base/dd.c:815
__device_attach_driver+0x2c6/0x510 drivers/base/dd.c:943
bus_for_each_drv+0x175/0x200 drivers/base/bus.c:429
__device_attach+0x29b/0x460 drivers/base/dd.c:1015
bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
device_add+0xa00/0xfb0 drivers/base/core.c:3697
usb_set_configuration+0x1991/0x1fd0 drivers/usb/core/message.c:2165
usb_generic_driver_probe+0x89/0x150 drivers/usb/core/generic.c:238
usb_probe_device+0x139/0x270 drivers/usb/core/driver.c:293
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x2aa/0xc70 drivers/base/dd.c:639
__driver_probe_device+0x18c/0x330 drivers/base/dd.c:785
driver_probe_device+0x4f/0x420 drivers/base/dd.c:815
__device_attach_driver+0x2c6/0x510 drivers/base/dd.c:943
bus_for_each_drv+0x175/0x200 drivers/base/bus.c:429
__device_attach+0x29b/0x460 drivers/base/dd.c:1015
bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
device_add+0xa00/0xfb0 drivers/base/core.c:3697
usb_new_device+0xd4d/0x1620 drivers/usb/core/hub.c:2659
hub_port_connect drivers/usb/core/hub.c:5517 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5657 [inline]
port_event drivers/usb/core/hub.c:5817 [inline]
hub_event+0x2d5e/0x54e0 drivers/usb/core/hub.c:5899
process_one_work+0x898/0x1160 kernel/workqueue.c:2292
worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Freed by task 14:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x2d/0x50 mm/kasan/generic.c:516
____kasan_slab_free+0x126/0x1e0 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1729 [inline]
slab_free_freelist_hook+0x131/0x1a0 mm/slub.c:1755
slab_free mm/slub.c:3687 [inline]
__kmem_cache_free+0xb6/0x1f0 mm/slub.c:3700
xpad_disconnect+0x34c/0x470 drivers/input/joystick/xpad.c:2150
usb_unbind_interface+0x1ee/0x860 drivers/usb/core/driver.c:458
device_remove drivers/base/dd.c:550 [inline]
__device_release_driver drivers/base/dd.c:1260 [inline]
device_release_driver_internal+0x522/0x850 drivers/base/dd.c:1286
bus_remove_device+0x2e2/0x400 drivers/base/bus.c:531
device_del+0x628/0xa70 drivers/base/core.c:3885
usb_disable_device+0x3e2/0x890 drivers/usb/core/message.c:1414
usb_disconnect+0x348/0x8a0 drivers/usb/core/hub.c:2314
hub_port_connect drivers/usb/core/hub.c:5361 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5657 [inline]
port_event drivers/usb/core/hub.c:5817 [inline]
hub_event+0x1e24/0x54e0 drivers/usb/core/hub.c:5899
process_one_work+0x898/0x1160 kernel/workqueue.c:2292
worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Last potentially related work creation:
kasan_save_stack+0x3a/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xb2/0xc0 mm/kasan/generic.c:486
kvfree_call_rcu+0x108/0x870 kernel/rcu/tree.c:3405
neigh_periodic_work+0x3f3/0xd70 net/core/neighbour.c:1010
process_one_work+0x898/0x1160 kernel/workqueue.c:2292
worker_thread+0xaa2/0x1250 kernel/workqueue.c:2439
kthread+0x29d/0x330 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
The buggy address belongs to the object at ffff888054406800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 92 bytes inside of
1024-byte region [ffff888054406800, ffff888054406c00)
The buggy address belongs to the physical page:
page:ffffea0001510000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x54400
head:ffffea0001510000 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0001ead600 dead000000000002 ffff888017441dc0
raw: 0000000000000000 0000000000100010 00000001ffffffff 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 4266, tgid 4266 (syz-executor), ts 83808900040, free_ts 26609088631
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2532
prep_new_page mm/page_alloc.c:2539 [inline]
get_page_from_freelist+0x1a26/0x1ac0 mm/page_alloc.c:4328
__alloc_pages+0x1df/0x4e0 mm/page_alloc.c:5614
alloc_slab_page+0x5d/0x160 mm/slub.c:1799
allocate_slab mm/slub.c:1944 [inline]
new_slab+0x87/0x2c0 mm/slub.c:1997
___slab_alloc+0xbc6/0x1230 mm/slub.c:3154
__slab_alloc mm/slub.c:3240 [inline]
slab_alloc_node mm/slub.c:3325 [inline]
__kmem_cache_alloc_node+0x1a0/0x260 mm/slub.c:3398
__do_kmalloc_node mm/slab_common.c:935 [inline]
__kmalloc_node_track_caller+0x9e/0x230 mm/slab_common.c:956
kmalloc_reserve net/core/skbuff.c:446 [inline]
__alloc_skb+0x22a/0x7e0 net/core/skbuff.c:515
alloc_skb include/linux/skbuff.h:1271 [inline]
nlmsg_new include/net/netlink.h:991 [inline]
rtmsg_fib+0xe7/0x4b0 net/ipv4/fib_semantics.c:522
fib_table_insert+0xd5d/0x1b50 net/ipv4/fib_trie.c:1385
fib_magic+0x2c1/0x390 net/ipv4/fib_frontend.c:1118
fib_add_ifaddr+0x3f7/0x5e0 net/ipv4/fib_frontend.c:1162
fib_netdev_event+0x361/0x470 net/ipv4/fib_frontend.c:1500
notifier_call_chain kernel/notifier.c:87 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:455
call_netdevice_notifiers_extack net/core/dev.c:2039 [inline]
call_netdevice_notifiers net/core/dev.c:2053 [inline]
__dev_notify_flags+0x178/0x2d0 net/core/dev.c:-1
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1459 [inline]
free_pcp_prepare mm/page_alloc.c:1509 [inline]
free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384
free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3479
free_contig_range+0x9d/0x150 mm/page_alloc.c:9574
destroy_args+0x100/0xa31 mm/debug_vm_pgtable.c:1031
debug_vm_pgtable+0x32a/0x37e mm/debug_vm_pgtable.c:1359
do_one_initcall+0x214/0x7a0 init/main.c:1298
do_initcall_level+0x137/0x1e4 init/main.c:1371
do_initcalls+0x4b/0x8a init/main.c:1387
kernel_init_freeable+0x3fa/0x5ac init/main.c:1626
kernel_init+0x19/0x1b0 init/main.c:1514
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Memory state around the buggy address:
ffff888054406700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888054406780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888054406800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888054406880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888054406900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 2e 0f 1f 84 00 00 00 cs nopl 0x0(%rax,%rax,1)
7: 00 00
9: 90 nop
a: 53 push %rbx
b: 48 89 fb mov %rdi,%rbx
e: e8 17 00 00 00 call 0x2a
13: 48 8b 3d d0 a6 9e 0c mov 0xc9ea6d0(%rip),%rdi # 0xc9ea6ea
1a: 48 89 de mov %rbx,%rsi
1d: 5b pop %rbx
1e: e9 37 58 4f 00 jmp 0x4f585a
23: 00 00 add %al,(%rax)
25: cc int3
26: cc int3
27: 00 00 add %al,(%rax)
29: cc int3
* 2a: 48 8b 04 24 mov (%rsp),%rax <-- trapping instruction
2e: 65 48 8b 0d a4 9e 81 mov %gs:0x7e819ea4(%rip),%rcx # 0x7e819eda
35: 7e
36: 65 8b 15 a5 9e 81 7e mov %gs:0x7e819ea5(%rip),%edx # 0x7e819ee2
3d: 81 .byte 0x81
3e: e2 00 loop 0x40