xpad 1-1:179.65: xpad_irq_in - usb_submit_urb failed with result -19
xpad 1-1:179.65: xpad_irq_out - usb_submit_urb failed with result -19
==================================================================
BUG: KASAN: slab-use-after-free in register_lock_class+0x805/0x8a0 kernel/locking/lockdep.c:1333
Read of size 1 at addr ffff88805d896091 by task syz.8.338/7428
CPU: 0 PID: 7428 Comm: syz.8.338 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xa8/0x210 mm/kasan/report.c:468
kasan_report+0x117/0x150 mm/kasan/report.c:581
register_lock_class+0x805/0x8a0 kernel/locking/lockdep.c:1333
__lock_acquire+0x17c/0x7d80 kernel/locking/lockdep.c:5014
lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5754
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xb4/0x100 kernel/locking/spinlock.c:162
__wake_up_common_lock kernel/sched/wait.c:137 [inline]
__wake_up+0x10b/0x1a0 kernel/sched/wait.c:160
__usb_hcd_giveback_urb+0x394/0x520 drivers/usb/core/hcd.c:1651
dummy_timer+0xa40/0x3420 drivers/usb/gadget/udc/dummy_hcd.c:2003
__run_hrtimer kernel/time/hrtimer.c:1754 [inline]
__hrtimer_run_queues+0x525/0xc10 kernel/time/hrtimer.c:1818
hrtimer_run_softirq+0x177/0x290 kernel/time/hrtimer.c:1835
handle_softirqs+0x27d/0x820 kernel/softirq.c:578
__do_softirq kernel/softirq.c:612 [inline]
invoke_softirq kernel/softirq.c:452 [inline]
__irq_exit_rcu+0xd3/0x190 kernel/softirq.c:661
irq_exit_rcu+0x9/0x20 kernel/softirq.c:673
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1088 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1088
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:687
RIP: 0010:arch_atomic64_read arch/x86/include/asm/atomic64_64.h:-1 [inline]
RIP: 0010:raw_atomic64_read include/linux/atomic/atomic-arch-fallback.h:2556 [inline]
RIP: 0010:raw_atomic_long_read include/linux/atomic/atomic-long.h:38 [inline]
RIP: 0010:atomic_long_read include/linux/atomic/atomic-instrumented.h:3161 [inline]
RIP: 0010:__mutex_trylock_common+0x9f/0x270 kernel/locking/mutex.c:107
Code: 48 8b 05 f4 61 9c 7e 48 89 04 24 be 08 00 00 00 e8 b6 08 78 00 4c 89 f0 48 c1 e8 03 80 3c 18 00 74 08 4c 89 f7 e8 e1 06 78 00 <48> 8d 5c 24 40 49 8b 06 48 c7 c1 80 e4 2e 97 48 c1 e9 03 48 c7 c2
RSP: 0018:ffffc9000372f500 EFLAGS: 00000246
RAX: 1ffff11005cb3fa6 RBX: dffffc0000000000 RCX: ffffffff8167565a
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88802e59fd30
RBP: ffffc9000372f5b0 R08: ffff88802e59fd37 R09: 1ffff11005cb3fa6
R10: dffffc0000000000 R11: ffffed1005cb3fa7 R12: 1ffff920006e5ec8
R13: 1ffff920006e5ea4 R14: ffff88802e59fd30 R15: 0000000000000000
__mutex_trylock kernel/locking/mutex.c:152 [inline]
__mutex_lock_common kernel/locking/mutex.c:606 [inline]
__mutex_lock+0x150/0xc80 kernel/locking/mutex.c:747
__unix_dgram_recvmsg+0x1fd/0xd90 net/unix/af_unix.c:2409
sock_recvmsg_nosec+0x82/0xd0 net/socket.c:1047
____sys_recvmsg+0x4d7/0x5d0 net/socket.c:2812
___sys_recvmsg+0x214/0x590 net/socket.c:2856
do_recvmmsg+0x377/0x810 net/socket.c:2950
__sys_recvmmsg net/socket.c:3029 [inline]
__do_sys_recvmmsg net/socket.c:3052 [inline]
__se_sys_recvmmsg net/socket.c:3045 [inline]
__x64_sys_recvmmsg+0x199/0x250 net/socket.c:3045
do_syscall_x64 arch/x86/entry/common.c:46 [inline]
do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7fc5be99de99
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fc5bf797028 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007fc5bec26090 RCX: 00007fc5be99de99
RDX: 00000000080002c1 RSI: 0000200000000040 RDI: 0000000000000003
RBP: 00007fc5bea33eaf R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fc5bec26128 R14: 00007fc5bec26090 R15: 00007ffcbd956fc8
Allocated by task 5822:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
____kasan_kmalloc mm/kasan/common.c:375 [inline]
__kasan_kmalloc+0x8f/0xa0 mm/kasan/common.c:384
kmalloc include/linux/slab.h:600 [inline]
kzalloc include/linux/slab.h:721 [inline]
xpad_probe+0x434/0x1e70 drivers/input/joystick/xpad.c:2081
usb_probe_interface+0x5c2/0xaf0 drivers/usb/core/driver.c:396
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x247/0xae0 drivers/base/dd.c:718
__driver_probe_device+0x1f5/0x390 drivers/base/dd.c:880
driver_probe_device+0x4f/0x420 drivers/base/dd.c:910
__device_attach_driver+0x2ca/0x510 drivers/base/dd.c:1038
bus_for_each_drv+0x252/0x2e0 drivers/base/bus.c:459
__device_attach+0x2c1/0x420 drivers/base/dd.c:1110
bus_probe_device+0x180/0x260 drivers/base/bus.c:580
device_add+0x87c/0xc40 drivers/base/core.c:3700
usb_set_configuration+0x1ad0/0x2150 drivers/usb/core/message.c:2265
usb_generic_driver_probe+0x8d/0x150 drivers/usb/core/generic.c:238
usb_probe_device+0x12a/0x260 drivers/usb/core/driver.c:293
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x247/0xae0 drivers/base/dd.c:718
__driver_probe_device+0x1f5/0x390 drivers/base/dd.c:880
driver_probe_device+0x4f/0x420 drivers/base/dd.c:910
__device_attach_driver+0x2ca/0x510 drivers/base/dd.c:1038
bus_for_each_drv+0x252/0x2e0 drivers/base/bus.c:459
__device_attach+0x2c1/0x420 drivers/base/dd.c:1110
bus_probe_device+0x180/0x260 drivers/base/bus.c:580
device_add+0x87c/0xc40 drivers/base/core.c:3700
usb_new_device+0x995/0x1550 drivers/usb/core/hub.c:2660
hub_port_connect drivers/usb/core/hub.c:5529 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5669 [inline]
port_event drivers/usb/core/hub.c:5833 [inline]
hub_event+0x29d5/0x4a80 drivers/usb/core/hub.c:5915
process_one_work kernel/workqueue.c:2653 [inline]
process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2730
worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2811
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
Freed by task 6692:
kasan_save_stack mm/kasan/common.c:46 [inline]
kasan_set_track+0x4e/0x70 mm/kasan/common.c:53
kasan_save_free_info+0x28/0x40 mm/kasan/generic.c:522
____kasan_slab_free+0x126/0x1f0 mm/kasan/common.c:237
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1811 [inline]
slab_free_freelist_hook+0x130/0x1a0 mm/slub.c:1837
slab_free mm/slub.c:3830 [inline]
__kmem_cache_free+0xba/0x1f0 mm/slub.c:3843
xpad_disconnect+0x323/0x440 drivers/input/joystick/xpad.c:2262
usb_unbind_interface+0x207/0x870 drivers/usb/core/driver.c:458
device_remove drivers/base/dd.c:629 [inline]
__device_release_driver drivers/base/dd.c:1352 [inline]
device_release_driver_internal+0x458/0x6f0 drivers/base/dd.c:1375
bus_remove_device+0x43b/0x520 drivers/base/bus.c:624
device_del+0x51f/0x910 drivers/base/core.c:3889
usb_disable_device+0x3ee/0x8a0 drivers/usb/core/message.c:1474
usb_disconnect+0x340/0x8a0 drivers/usb/core/hub.c:2315
hub_port_connect drivers/usb/core/hub.c:5369 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5669 [inline]
port_event drivers/usb/core/hub.c:5833 [inline]
hub_event+0x1d69/0x4a80 drivers/usb/core/hub.c:5915
process_one_work kernel/workqueue.c:2653 [inline]
process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2730
worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2811
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
Last potentially related work creation:
kasan_save_stack+0x3e/0x60 mm/kasan/common.c:46
__kasan_record_aux_stack+0xaf/0xc0 mm/kasan/generic.c:492
kvfree_call_rcu+0xee/0x780 kernel/rcu/tree.c:3452
neigh_del net/core/neighbour.c:226 [inline]
neigh_remove_one+0x5f1/0x700 net/core/neighbour.c:247
neigh_forced_gc net/core/neighbour.c:280 [inline]
neigh_alloc net/core/neighbour.c:486 [inline]
___neigh_create+0x491/0x23d0 net/core/neighbour.c:649
ip6_finish_output2+0x156d/0x1620 net/ipv6/ip6_output.c:132
dst_output include/net/dst.h:467 [inline]
NF_HOOK+0x167/0x4a0 include/linux/netfilter.h:304
mld_sendpack+0x802/0xd60 net/ipv6/mcast.c:1823
mld_send_cr net/ipv6/mcast.c:2124 [inline]
mld_ifc_work+0x839/0xde0 net/ipv6/mcast.c:2654
process_one_work kernel/workqueue.c:2653 [inline]
process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2730
worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2811
kthread+0x2fa/0x390 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
The buggy address belongs to the object at ffff88805d896000
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 145 bytes inside of
freed 1024-byte region [ffff88805d896000, ffff88805d896400)
The buggy address belongs to the physical page:
page:ffffea0001762400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5d890
head:ffffea0001762400 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
ksm flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888017c41dc0 ffffea00015de800 dead000000000003
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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5823, tgid 5823 (kworker/1:4), ts 90714787844, free_ts 29605739873
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1582
prep_new_page mm/page_alloc.c:1589 [inline]
get_page_from_freelist+0x2181/0x22a0 mm/page_alloc.c:3221
__alloc_pages+0x1f0/0x460 mm/page_alloc.c:4501
alloc_slab_page+0x5d/0x180 mm/slub.c:1881
allocate_slab mm/slub.c:2028 [inline]
new_slab+0x87/0x2d0 mm/slub.c:2081
___slab_alloc+0xc5c/0x12f0 mm/slub.c:3253
__slab_alloc mm/slub.c:3339 [inline]
__slab_alloc_node mm/slub.c:3392 [inline]
slab_alloc_node mm/slub.c:3485 [inline]
__kmem_cache_alloc_node+0x11f/0x250 mm/slub.c:3534
__do_kmalloc_node mm/slab_common.c:1006 [inline]
__kmalloc+0xa7/0x240 mm/slab_common.c:1020
kmalloc include/linux/slab.h:604 [inline]
kzalloc include/linux/slab.h:721 [inline]
neigh_alloc net/core/neighbour.c:495 [inline]
___neigh_create+0x6f4/0x23d0 net/core/neighbour.c:649
ip6_finish_output2+0x156d/0x1620 net/ipv6/ip6_output.c:132
dst_output include/net/dst.h:467 [inline]
NF_HOOK+0x167/0x4a0 include/linux/netfilter.h:304
mld_sendpack+0x802/0xd60 net/ipv6/mcast.c:1823
mld_send_cr net/ipv6/mcast.c:2124 [inline]
mld_ifc_work+0x839/0xde0 net/ipv6/mcast.c:2654
process_one_work kernel/workqueue.c:2653 [inline]
process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2730
worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2811
kthread+0x2fa/0x390 kernel/kthread.c:388
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1182 [inline]
free_unref_page_prepare+0x7d7/0x8f0 mm/page_alloc.c:2366
free_unref_page+0x32/0x2e0 mm/page_alloc.c:2459
free_contig_range+0xa1/0x150 mm/page_alloc.c:6421
destroy_args+0x7d/0x840 mm/debug_vm_pgtable.c:1015
debug_vm_pgtable+0x411/0x440 mm/debug_vm_pgtable.c:1400
do_one_initcall+0x242/0x790 init/main.c:1249
do_initcall_level+0x13d/0x1f0 init/main.c:1311
do_initcalls+0x69/0xd0 init/main.c:1327
kernel_init_freeable+0x3d9/0x560 init/main.c:1564
kernel_init+0x1d/0x1c0 init/main.c:1454
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293
Memory state around the buggy address:
ffff88805d895f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88805d896000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88805d896080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88805d896100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88805d896180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 48 8b 05 f4 61 9c 7e mov 0x7e9c61f4(%rip),%rax # 0x7e9c61fb
7: 48 89 04 24 mov %rax,(%rsp)
b: be 08 00 00 00 mov $0x8,%esi
10: e8 b6 08 78 00 call 0x7808cb
15: 4c 89 f0 mov %r14,%rax
18: 48 c1 e8 03 shr $0x3,%rax
1c: 80 3c 18 00 cmpb $0x0,(%rax,%rbx,1)
20: 74 08 je 0x2a
22: 4c 89 f7 mov %r14,%rdi
25: e8 e1 06 78 00 call 0x78070b
* 2a: 48 8d 5c 24 40 lea 0x40(%rsp),%rbx <-- trapping instruction
2f: 49 8b 06 mov (%r14),%rax
32: 48 c7 c1 80 e4 2e 97 mov $0xffffffff972ee480,%rcx
39: 48 c1 e9 03 shr $0x3,%rcx
3d: 48 rex.W
3e: c7 .byte 0xc7
3f: c2 .byte 0xc2