xpad 4-1:179.65: xpad_irq_in - usb_submit_urb failed with result -19
xpad 4-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+0x283/0x2f0 kernel/locking/spinlock_debug.c:114
Read of size 4 at addr ffff88802077385c by task syz.1.594/5623
CPU: 0 PID: 5623 Comm: syz.1.594 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
Call Trace:
dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106
print_address_description+0x60/0x2d0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0xdf/0x130 mm/kasan/report.c:451
debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline]
do_raw_spin_lock+0x283/0x2f0 kernel/locking/spinlock_debug.c:114
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:117 [inline]
_raw_spin_lock_irqsave+0xbc/0x100 kernel/locking/spinlock.c:162
__wake_up_common_lock kernel/sched/wait.c:137 [inline]
__wake_up+0xf4/0x180 kernel/sched/wait.c:157
__usb_hcd_giveback_urb+0x394/0x520 drivers/usb/core/hcd.c:1677
dummy_timer+0xa47/0x34a0 drivers/usb/gadget/udc/dummy_hcd.c:2012
call_timer_fn+0x17b/0x540 kernel/time/timer.c:1648
expire_timers kernel/time/timer.c:1699 [inline]
__run_timers+0x56c/0x810 kernel/time/timer.c:1970
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1983
handle_softirqs+0x336/0x830 kernel/softirq.c:576
__do_softirq kernel/softirq.c:610 [inline]
invoke_softirq kernel/softirq.c:450 [inline]
__irq_exit_rcu+0x13b/0x230 kernel/softirq.c:659
irq_exit_rcu+0x5/0x20 kernel/softirq.c:671
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
RIP: 0010:do_user_addr_fault+0x1b2/0xc90 arch/x86/mm/fault.c:1254
Code: 5c 24 10 48 8b 1b 48 89 de 48 83 e6 03 31 ff e8 44 a1 43 00 48 83 e3 03 74 12 e8 59 9d 43 00 e8 24 c9 49 00 fb bb 54 02 00 00 50 49 8d 9d 90 00 00 00 48 89 d8 48 c1 e8 03 80 3c 28 00 74 08
RSP: 0000:ffffc900031cfe80 EFLAGS: 00000282
RAX: bafc985712e59500 RBX: 0000000000000254 RCX: bafc985712e59500
RDX: dffffc0000000000 RSI: ffffffff8a2b2be0 RDI: ffffffff8a7a4c00
RBP: dffffc0000000000 R08: ffffffff8e6b282f R09: 1ffffffff1cd6505
R10: dffffc0000000000 R11: fffffbfff1cd6506 R12: 00007f61d8c9c000
R13: ffffc900031cff58 R14: 0000000000000004 R15: ffff888023509c00
handle_page_fault arch/x86/mm/fault.c:1443 [inline]
exc_page_fault+0x60/0x100 arch/x86/mm/fault.c:1496
asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606
RIP: 0033:0x7f61e200528e
Code: c1 49 39 4f 08 72 54 8d 4d ff 85 ed 74 3b 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 39 f0 72 1b 4d 8b 07 49 89 c1 49 29 f1 <47> 0f b6 0c 08 45 84 c9 74 08 45 88 0c 00 49 8b 47 10 48 83 c0 01
RSP: 002b:00007f61e03a5470 EFLAGS: 00010206
RAX: 0000000000d16001 RBX: 00007f61e03a5530 RCX: 000000000000004b
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 00007f61e03a55d0
RBP: 0000000000000102 R08: 00007f61d7f86000 R09: 0000000000d16000
R10: 0000000000000000 R11: 00007f61e03a5540 R12: 0000000000000001
R13: 00007f61e22059e0 R14: 0000000000000000 R15: 00007f61e03a55d0
Allocated by task 1108:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track mm/kasan/common.c:46 [inline]
set_alloc_info mm/kasan/common.c:434 [inline]
____kasan_kmalloc mm/kasan/common.c:513 [inline]
__kasan_kmalloc+0xaf/0xe0 mm/kasan/common.c:522
kmalloc include/linux/slab.h:607 [inline]
kzalloc include/linux/slab.h:738 [inline]
xpad_probe+0x408/0x1980 drivers/input/joystick/xpad.c:1800
usb_probe_interface+0x5be/0xae0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x276/0xc70 drivers/base/dd.c:595
__driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775
driver_probe_device+0x4f/0x420 drivers/base/dd.c:805
__device_attach_driver+0x2b0/0x500 drivers/base/dd.c:927
bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
__device_attach+0x2a7/0x480 drivers/base/dd.c:999
bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489
device_add+0xbcf/0x1050 drivers/base/core.c:3427
usb_set_configuration+0x19d5/0x2030 drivers/usb/core/message.c:2223
usb_generic_driver_probe+0x89/0x150 drivers/usb/core/generic.c:238
usb_probe_device+0x126/0x250 drivers/usb/core/driver.c:293
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x276/0xc70 drivers/base/dd.c:595
__driver_probe_device+0x1f5/0x390 drivers/base/dd.c:775
driver_probe_device+0x4f/0x420 drivers/base/dd.c:805
__device_attach_driver+0x2b0/0x500 drivers/base/dd.c:927
bus_for_each_drv+0x184/0x210 drivers/base/bus.c:429
__device_attach+0x2a7/0x480 drivers/base/dd.c:999
bus_probe_device+0xba/0x1d0 drivers/base/bus.c:489
device_add+0xbcf/0x1050 drivers/base/core.c:3427
usb_new_device+0x9f6/0x15d0 drivers/usb/core/hub.c:2637
hub_port_connect drivers/usb/core/hub.c:5502 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5642 [inline]
port_event drivers/usb/core/hub.c:5804 [inline]
hub_event+0x2b8d/0x5260 drivers/usb/core/hub.c:5886
process_one_work+0x867/0xff0 kernel/workqueue.c:2310
worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457
kthread+0x42e/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
Freed by task 5355:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:46
kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
____kasan_slab_free+0xd5/0x110 mm/kasan/common.c:366
kasan_slab_free include/linux/kasan.h:230 [inline]
slab_free_hook mm/slub.c:1710 [inline]
slab_free_freelist_hook+0xec/0x170 mm/slub.c:1736
slab_free mm/slub.c:3504 [inline]
kfree+0xef/0x2a0 mm/slub.c:4564
xpad_disconnect+0x31f/0x440 drivers/input/joystick/xpad.c:1948
usb_unbind_interface+0x203/0x870 drivers/usb/core/driver.c:458
__device_release_driver drivers/base/dd.c:1249 [inline]
device_release_driver_internal+0x487/0x710 drivers/base/dd.c:1282
bus_remove_device+0x2dd/0x400 drivers/base/bus.c:531
device_del+0x63f/0xa80 drivers/base/core.c:3615
usb_disable_device+0x3e7/0x8a0 drivers/usb/core/message.c:1472
usb_disconnect+0x33c/0x8a0 drivers/usb/core/hub.c:2292
hub_port_connect drivers/usb/core/hub.c:5346 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5642 [inline]
port_event drivers/usb/core/hub.c:5804 [inline]
hub_event+0x1d64/0x5260 drivers/usb/core/hub.c:5886
process_one_work+0x867/0xff0 kernel/workqueue.c:2310
worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457
kthread+0x42e/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
Last potentially related work creation:
kasan_save_stack+0x35/0x60 mm/kasan/common.c:38
kasan_record_aux_stack+0xb8/0x100 mm/kasan/generic.c:348
kvfree_call_rcu+0x105/0x7f0 kernel/rcu/tree.c:3600
neigh_del net/core/neighbour.c:197 [inline]
neigh_remove_one+0x4e0/0x5e0 net/core/neighbour.c:218
neigh_forced_gc net/core/neighbour.c:251 [inline]
neigh_alloc net/core/neighbour.c:429 [inline]
___neigh_create+0x48f/0x2210 net/core/neighbour.c:591
ip6_finish_output2+0xacc/0x1640 net/ipv6/ip6_output.c:129
dst_output include/net/dst.h:452 [inline]
NF_HOOK include/linux/netfilter.h:302 [inline]
ndisc_send_skb+0xb7c/0x1410 net/ipv6/ndisc.c:513
addrconf_rs_timer+0x367/0x640 net/ipv6/addrconf.c:3974
call_timer_fn+0x17b/0x540 kernel/time/timer.c:1648
expire_timers kernel/time/timer.c:1699 [inline]
__run_timers+0x56c/0x810 kernel/time/timer.c:1970
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1983
handle_softirqs+0x336/0x830 kernel/softirq.c:576
__do_softirq kernel/softirq.c:610 [inline]
invoke_softirq kernel/softirq.c:450 [inline]
__irq_exit_rcu+0x13b/0x230 kernel/softirq.c:659
irq_exit_rcu+0x5/0x20 kernel/softirq.c:671
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
sysvec_apic_timer_interrupt+0xa0/0xc0 arch/x86/kernel/apic/apic.c:1108
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
The buggy address belongs to the object at ffff888020773800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 92 bytes inside of
1024-byte region [ffff888020773800, ffff888020773c00)
The buggy address belongs to the page:
page:ffffea000081dc00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x20770
head:ffffea000081dc00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888017841dc0
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 0x52a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 4188, ts 75562989088, free_ts 75523668077
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192
__alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501
alloc_slab_page mm/slub.c:1780 [inline]
allocate_slab mm/slub.c:1917 [inline]
new_slab+0xc0/0x4b0 mm/slub.c:1980
___slab_alloc+0x807/0xdd0 mm/slub.c:3013
__slab_alloc mm/slub.c:3100 [inline]
slab_alloc_node mm/slub.c:3191 [inline]
slab_alloc mm/slub.c:3233 [inline]
__kmalloc+0x11d/0x340 mm/slub.c:4408
kmalloc include/linux/slab.h:612 [inline]
kzalloc include/linux/slab.h:738 [inline]
neigh_alloc net/core/neighbour.c:438 [inline]
___neigh_create+0x6fa/0x2210 net/core/neighbour.c:591
ip_neigh_gw4+0x34d/0x4d0 include/net/route.h:372
ip_neigh_for_gw include/net/route.h:-1 [inline]
ip_finish_output2+0x4e0/0x10e0 net/ipv4/ip_output.c:222
NF_HOOK_COND include/linux/netfilter.h:291 [inline]
ip_output+0x2ba/0x3e0 net/ipv4/ip_output.c:434
igmpv3_send_cr net/ipv4/igmp.c:727 [inline]
igmp_ifc_timer_expire+0xa97/0xbf0 net/ipv4/igmp.c:817
call_timer_fn+0x17b/0x540 kernel/time/timer.c:1648
expire_timers kernel/time/timer.c:1699 [inline]
__run_timers+0x56c/0x810 kernel/time/timer.c:1970
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1983
handle_softirqs+0x336/0x830 kernel/softirq.c:576
__do_softirq kernel/softirq.c:610 [inline]
invoke_softirq kernel/softirq.c:450 [inline]
__irq_exit_rcu+0x13b/0x230 kernel/softirq.c:659
irq_exit_rcu+0x5/0x20 kernel/softirq.c:671
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1340 [inline]
free_pcp_prepare mm/page_alloc.c:1391 [inline]
free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317
free_unref_page+0x8f/0x2a0 mm/page_alloc.c:3396
free_slab mm/slub.c:2020 [inline]
discard_slab mm/slub.c:2026 [inline]
__unfreeze_partials+0x188/0x1e0 mm/slub.c:2512
put_cpu_partial+0x12d/0x190 mm/slub.c:2592
qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444
kasan_slab_alloc include/linux/kasan.h:254 [inline]
slab_post_alloc_hook+0x4c/0x380 mm/slab.h:519
slab_alloc_node mm/slub.c:3225 [inline]
slab_alloc mm/slub.c:3233 [inline]
kmem_cache_alloc+0x15d/0x280 mm/slub.c:3238
sock_alloc_inode+0x17/0xb0 net/socket.c:305
alloc_inode fs/inode.c:261 [inline]
new_inode_pseudo+0x5f/0x210 fs/inode.c:1001
sock_alloc net/socket.c:628 [inline]
__sock_create+0x128/0x910 net/socket.c:1460
sock_create net/socket.c:1552 [inline]
__sys_socket+0xe2/0x170 net/socket.c:1594
__do_sys_socket net/socket.c:1603 [inline]
__se_sys_socket net/socket.c:1601 [inline]
__x64_sys_socket+0x76/0x80 net/socket.c:1601
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
Memory state around the buggy address:
ffff888020773700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888020773780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888020773800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888020773880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888020773900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 5c pop %rsp
1: 24 10 and $0x10,%al
3: 48 8b 1b mov (%rbx),%rbx
6: 48 89 de mov %rbx,%rsi
9: 48 83 e6 03 and $0x3,%rsi
d: 31 ff xor %edi,%edi
f: e8 44 a1 43 00 call 0x43a158
14: 48 83 e3 03 and $0x3,%rbx
18: 74 12 je 0x2c
1a: e8 59 9d 43 00 call 0x439d78
1f: e8 24 c9 49 00 call 0x49c948
24: fb sti
25: bb 54 02 00 00 mov $0x254,%ebx
* 2a: eb 50 jmp 0x7c <-- trapping instruction
2c: 49 8d 9d 90 00 00 00 lea 0x90(%r13),%rbx
33: 48 89 d8 mov %rbx,%rax
36: 48 c1 e8 03 shr $0x3,%rax
3a: 80 3c 28 00 cmpb $0x0,(%rax,%rbp,1)
3e: 74 08 je 0x48