xpad 6-1:179.65: xpad_irq_in - usb_submit_urb failed with result -19
xpad 6-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 ffff888022d5905c by task syz.7.321/6213
CPU: 1 PID: 6213 Comm: syz.7.321 Not tainted 5.15.185-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
dump_stack_lvl+0x168/0x230 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+0x235/0x280 kernel/locking/spinlock_debug.c:114
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:117 [inline]
_raw_spin_lock_irqsave+0xb0/0xf0 kernel/locking/spinlock.c:162
__wake_up_common_lock kernel/sched/wait.c:137 [inline]
__wake_up+0xed/0x180 kernel/sched/wait.c:157
__usb_hcd_giveback_urb+0x396/0x520 drivers/usb/core/hcd.c:1677
dummy_timer+0x827/0x2e10 drivers/usb/gadget/udc/dummy_hcd.c:1987
call_timer_fn+0x16c/0x530 kernel/time/timer.c:1451
expire_timers kernel/time/timer.c:1496 [inline]
__run_timers+0x525/0x7c0 kernel/time/timer.c:1767
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780
handle_softirqs+0x328/0x820 kernel/softirq.c:576
__do_softirq kernel/softirq.c:610 [inline]
invoke_softirq kernel/softirq.c:450 [inline]
__irq_exit_rcu+0x12f/0x220 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:console_unlock+0xd90/0x1200 kernel/printk/printk.c:2749
Code: 00 48 83 7c 24 28 00 75 19 e8 ec 9e 18 00 eb 18 e8 e5 9e 18 00 e8 80 49 42 08 48 83 7c 24 28 00 74 e7 e8 d3 9e 18 00 fb 31 ff <89> de e8 29 a2 18 00 85 db 0f 94 c0 22 44 24 17 3c 01 75 1f e8 b7
RSP: 0018:ffffc900033bef60 EFLAGS: 00000246
RAX: ffffffff815f234d RBX: 0000000000000000 RCX: 0000000000080000
RDX: ffffc90014150000 RSI: 0000000000001c59 RDI: 0000000000000000
RBP: ffffc900033bf1d0 R08: dffffc0000000000 R09: fffffbfff1ff3619
R10: fffffbfff1ff3619 R11: 1ffffffff1ff3618 R12: 1ffffffff194c725
R13: dffffc0000000000 R14: 0000000000000000 R15: 1ffffffff194c71e
vprintk_emit+0xc0/0x150 kernel/printk/printk.c:2274
_printk+0xcc/0x110 kernel/printk/printk.c:2299
validate_nla lib/nlattr.c:379 [inline]
__nla_validate_parse+0x16f8/0x2750 lib/nlattr.c:591
__nla_parse+0x3c/0x50 lib/nlattr.c:688
__nlmsg_parse include/net/netlink.h:733 [inline]
nlmsg_parse_deprecated include/net/netlink.h:772 [inline]
xfrm_user_rcv_msg+0x53d/0x860 net/xfrm/xfrm_user.c:2968
netlink_rcv_skb+0x1e0/0x430 net/netlink/af_netlink.c:2489
xfrm_netlink_rcv+0x75/0x90 net/xfrm/xfrm_user.c:3001
netlink_unicast_kernel net/netlink/af_netlink.c:1311 [inline]
netlink_unicast+0x77c/0x920 net/netlink/af_netlink.c:1337
netlink_sendmsg+0x8ab/0xbc0 net/netlink/af_netlink.c:1905
sock_sendmsg_nosec net/socket.c:704 [inline]
__sock_sendmsg net/socket.c:716 [inline]
____sys_sendmsg+0x5a2/0x8c0 net/socket.c:2436
___sys_sendmsg+0x1f0/0x260 net/socket.c:2490
__sys_sendmsg net/socket.c:2519 [inline]
__do_sys_sendmsg net/socket.c:2528 [inline]
__se_sys_sendmsg+0x190/0x250 net/socket.c:2526
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
RIP: 0033:0x7f5524eb5929
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f5522d1d038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f55250dcfa0 RCX: 00007f5524eb5929
RDX: 0000000000000000 RSI: 0000200000000180 RDI: 0000000000000003
RBP: 00007f5524f37b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f55250dcfa0 R15: 00007ffce6c61988
Allocated by task 6108:
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+0xb5/0xf0 mm/kasan/common.c:522
kmalloc include/linux/slab.h:604 [inline]
kzalloc include/linux/slab.h:735 [inline]
xpad_probe+0x3f6/0x1b20 drivers/input/joystick/xpad.c:1788
usb_probe_interface+0x5a0/0xaf0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x284/0xc80 drivers/base/dd.c:595
__driver_probe_device+0x18c/0x330 drivers/base/dd.c:755
driver_probe_device+0x4f/0x420 drivers/base/dd.c:785
__device_attach_driver+0x2b0/0x500 drivers/base/dd.c:907
bus_for_each_drv+0x175/0x200 drivers/base/bus.c:429
__device_attach+0x29b/0x460 drivers/base/dd.c:979
bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
device_add+0xa00/0xfb0 drivers/base/core.c:3412
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+0x284/0xc80 drivers/base/dd.c:595
__driver_probe_device+0x18c/0x330 drivers/base/dd.c:755
driver_probe_device+0x4f/0x420 drivers/base/dd.c:785
__device_attach_driver+0x2b0/0x500 drivers/base/dd.c:907
bus_for_each_drv+0x175/0x200 drivers/base/bus.c:429
__device_attach+0x29b/0x460 drivers/base/dd.c:979
bus_probe_device+0xbc/0x1e0 drivers/base/bus.c:489
device_add+0xa00/0xfb0 drivers/base/core.c:3412
usb_new_device+0xd53/0x1640 drivers/usb/core/hub.c:2604
hub_port_connect drivers/usb/core/hub.c:5467 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5607 [inline]
port_event drivers/usb/core/hub.c:5753 [inline]
hub_event+0x295c/0x4fa0 drivers/usb/core/hub.c:5835
process_one_work+0x863/0x1000 kernel/workqueue.c:2310
worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457
kthread+0x436/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
Freed by task 4737:
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:1705 [inline]
slab_free_freelist_hook+0xea/0x170 mm/slub.c:1731
slab_free mm/slub.c:3499 [inline]
kfree+0xef/0x2a0 mm/slub.c:4559
xpad_disconnect+0x34c/0x470 drivers/input/joystick/xpad.c:1936
usb_unbind_interface+0x1ee/0x860 drivers/usb/core/driver.c:458
__device_release_driver drivers/base/dd.c:1229 [inline]
device_release_driver_internal+0x4b4/0x750 drivers/base/dd.c:1262
bus_remove_device+0x2e2/0x400 drivers/base/bus.c:531
device_del+0x628/0xa70 drivers/base/core.c:3600
usb_disable_device+0x3e2/0x890 drivers/usb/core/message.c:1414
usb_disconnect+0x348/0x8a0 drivers/usb/core/hub.c:2259
hub_port_connect drivers/usb/core/hub.c:5311 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5607 [inline]
port_event drivers/usb/core/hub.c:5753 [inline]
hub_event+0x1af8/0x4fa0 drivers/usb/core/hub.c:5835
process_one_work+0x863/0x1000 kernel/workqueue.c:2310
worker_thread+0xaa8/0x12a0 kernel/workqueue.c:2457
kthread+0x436/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
insert_work+0x54/0x3d0 kernel/workqueue.c:1366
__queue_work+0x9c5/0xd50 kernel/workqueue.c:1532
queue_work_on+0x11d/0x1d0 kernel/workqueue.c:1559
queue_work include/linux/workqueue.h:512 [inline]
schedule_work include/linux/workqueue.h:573 [inline]
xpad360w_process_packet drivers/input/joystick/xpad.c:853 [inline]
xpad_irq_in+0xaab/0x1b30 drivers/input/joystick/xpad.c:993
__usb_hcd_giveback_urb+0x35f/0x520 drivers/usb/core/hcd.c:1674
dummy_timer+0x827/0x2e10 drivers/usb/gadget/udc/dummy_hcd.c:1987
call_timer_fn+0x16c/0x530 kernel/time/timer.c:1451
expire_timers kernel/time/timer.c:1496 [inline]
__run_timers+0x525/0x7c0 kernel/time/timer.c:1767
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780
handle_softirqs+0x328/0x820 kernel/softirq.c:576
__do_softirq kernel/softirq.c:610 [inline]
invoke_softirq kernel/softirq.c:450 [inline]
__irq_exit_rcu+0x12f/0x220 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
Second to 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
insert_work+0x54/0x3d0 kernel/workqueue.c:1366
__queue_work+0x9c5/0xd50 kernel/workqueue.c:1532
queue_work_on+0x11d/0x1d0 kernel/workqueue.c:1559
queue_work include/linux/workqueue.h:512 [inline]
schedule_work include/linux/workqueue.h:573 [inline]
xpad360w_process_packet drivers/input/joystick/xpad.c:853 [inline]
xpad_irq_in+0xaab/0x1b30 drivers/input/joystick/xpad.c:993
__usb_hcd_giveback_urb+0x35f/0x520 drivers/usb/core/hcd.c:1674
dummy_timer+0x827/0x2e10 drivers/usb/gadget/udc/dummy_hcd.c:1987
call_timer_fn+0x16c/0x530 kernel/time/timer.c:1451
expire_timers kernel/time/timer.c:1496 [inline]
__run_timers+0x525/0x7c0 kernel/time/timer.c:1767
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780
handle_softirqs+0x328/0x820 kernel/softirq.c:576
__do_softirq kernel/softirq.c:610 [inline]
invoke_softirq kernel/softirq.c:450 [inline]
__irq_exit_rcu+0x12f/0x220 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+0x52/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 ffff888022d59000
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 92 bytes inside of
1024-byte region [ffff888022d59000, ffff888022d59400)
The buggy address belongs to the page:
page:ffffea00008b5600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x22d58
head:ffffea00008b5600 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0000928c00 0000000700000007 ffff888016841dc0
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 4168, ts 73314094917, free_ts 73311364330
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x1b77/0x1c60 mm/page_alloc.c:4192
__alloc_pages+0x1e1/0x470 mm/page_alloc.c:5474
alloc_slab_page mm/slub.c:1775 [inline]
allocate_slab mm/slub.c:1912 [inline]
new_slab+0xc0/0x4b0 mm/slub.c:1975
___slab_alloc+0x81e/0xdf0 mm/slub.c:3008
__slab_alloc mm/slub.c:3095 [inline]
slab_alloc_node mm/slub.c:3186 [inline]
__kmalloc_node_track_caller+0x1fc/0x3a0 mm/slub.c:4958
kmalloc_reserve net/core/skbuff.c:356 [inline]
__alloc_skb+0x22c/0x750 net/core/skbuff.c:427
alloc_skb include/linux/skbuff.h:1162 [inline]
nlmsg_new include/net/netlink.h:953 [inline]
rtmsg_fib+0xe7/0x4b0 net/ipv4/fib_semantics.c:520
fib_table_insert+0x987/0x1b20 net/ipv4/fib_trie.c:1379
fib_magic+0x2c1/0x390 net/ipv4/fib_frontend.c:1106
fib_add_ifaddr+0x389/0x5e0 net/ipv4/fib_frontend.c:1143
fib_netdev_event+0x35c/0x480 net/ipv4/fib_frontend.c:1488
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
call_netdevice_notifiers net/core/dev.c:2075 [inline]
__dev_notify_flags+0x178/0x2d0 net/core/dev.c:-1
dev_change_flags+0xe3/0x1a0 net/core/dev.c:8929
do_setlink+0xc01/0x3980 net/core/rtnetlink.c:2779
__rtnl_newlink net/core/rtnetlink.c:3450 [inline]
rtnl_newlink+0x1419/0x17d0 net/core/rtnetlink.c:3572
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+0x94/0x280 mm/page_alloc.c:3396
free_slab mm/slub.c:2015 [inline]
discard_slab mm/slub.c:2021 [inline]
__unfreeze_partials+0x1a5/0x200 mm/slub.c:2507
put_cpu_partial+0x12d/0x190 mm/slub.c:2587
qlist_free_all+0x35/0x90 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x150/0x160 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x2f/0xd0 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:3220 [inline]
kmem_cache_alloc_node+0x12d/0x2d0 mm/slub.c:3256
__alloc_skb+0xf4/0x750 net/core/skbuff.c:415
alloc_skb include/linux/skbuff.h:1162 [inline]
nlmsg_new include/net/netlink.h:953 [inline]
rtmsg_ifinfo_build_skb+0x80/0x180 net/core/rtnetlink.c:3884
rtmsg_ifinfo_event net/core/rtnetlink.c:3920 [inline]
rtnetlink_event+0xcd/0x1a0 net/core/rtnetlink.c:5701
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xcb/0x160 kernel/notifier.c:391
call_netdevice_notifiers_extack net/core/dev.c:2061 [inline]
call_netdevice_notifiers net/core/dev.c:2075 [inline]
dev_change_name+0x671/0xbd0 net/core/dev.c:1332
do_setlink+0x99d/0x3980 net/core/rtnetlink.c:2759
__rtnl_newlink net/core/rtnetlink.c:3450 [inline]
rtnl_newlink+0x1419/0x17d0 net/core/rtnetlink.c:3572
Memory state around the buggy address:
ffff888022d58f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888022d58f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888022d59000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888022d59080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888022d59100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 00 48 83 add %cl,-0x7d(%rax)
3: 7c 24 jl 0x29
5: 28 00 sub %al,(%rax)
7: 75 19 jne 0x22
9: e8 ec 9e 18 00 call 0x189efa
e: eb 18 jmp 0x28
10: e8 e5 9e 18 00 call 0x189efa
15: e8 80 49 42 08 call 0x842499a
1a: 48 83 7c 24 28 00 cmpq $0x0,0x28(%rsp)
20: 74 e7 je 0x9
22: e8 d3 9e 18 00 call 0x189efa
27: fb sti
28: 31 ff xor %edi,%edi
* 2a: 89 de mov %ebx,%esi <-- trapping instruction
2c: e8 29 a2 18 00 call 0x18a25a
31: 85 db test %ebx,%ebx
33: 0f 94 c0 sete %al
36: 22 44 24 17 and 0x17(%rsp),%al
3a: 3c 01 cmp $0x1,%al
3c: 75 1f jne 0x5d
3e: e8 .byte 0xe8
3f: b7 .byte 0xb7