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: use-after-free in register_lock_class+0x7f8/0x890 kernel/locking/lockdep.c:1294
Read of size 1 at addr ffff88802b8f5891 by task syz.0.56/4453
CPU: 1 PID: 4453 Comm: syz.0.56 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
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
register_lock_class+0x7f8/0x890 kernel/locking/lockdep.c:1294
__lock_acquire+0x16f/0x7d10 kernel/locking/lockdep.c:4891
lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xb0/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+0x396/0x520 drivers/usb/core/hcd.c:1677
dummy_timer+0x8a8/0x31e0 drivers/usb/gadget/udc/dummy_hcd.c:1988
call_timer_fn+0x17b/0x540 kernel/time/timer.c:1451
expire_timers kernel/time/timer.c:1496 [inline]
__run_timers+0x53a/0x7f0 kernel/time/timer.c:1767
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780
handle_softirqs+0x339/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:arch_atomic_read arch/x86/include/asm/atomic.h:29 [inline]
RIP: 0010:rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:331 [inline]
RIP: 0010:rcu_is_watching+0x56/0xa0 kernel/rcu/tree.c:1123
Code: f0 48 c1 e8 03 42 80 3c 38 00 74 08 4c 89 f7 e8 f0 51 59 00 48 c7 c3 08 b3 03 00 49 03 1e 48 89 d8 48 c1 e8 03 42 0f b6 04 38 <84> c0 75 2b 8b 03 65 ff 0d d5 9d 9d 7e 74 08 24 01 5b 41 5e 41 5f
RSP: 0018:ffffc9000480f2c0 EFLAGS: 00000a02
RAX: 0000000000000000 RBX: ffff8880b913b308 RCX: 1d707c94ee108600
RDX: 0000000000000000 RSI: ffffffff8a79f760 RDI: ffffffff8a79f720
RBP: ffffc9000480f400 R08: ffffffff8d89d8af R09: 1ffffffff1b13b15
R10: dffffc0000000000 R11: fffffbfff1b13b16 R12: ffffffff8c31eaa0
R13: 1ffff92000901e68 R14: ffffffff8be30828 R15: dffffc0000000000
trace_lock_acquire include/trace/events/lock.h:13 [inline]
lock_acquire+0xc8/0x400 kernel/locking/lockdep.c:5594
rcu_lock_acquire+0x20/0x30 include/linux/rcupdate.h:313
rcu_read_lock include/linux/rcupdate.h:740 [inline]
lock_page_memcg+0xa5/0x440 mm/memcontrol.c:2047
page_remove_rmap+0x2a/0x10f0 mm/rmap.c:1351
zap_pte_range mm/memory.c:1384 [inline]
zap_pmd_range mm/memory.c:1505 [inline]
zap_pud_range mm/memory.c:1534 [inline]
zap_p4d_range mm/memory.c:1555 [inline]
unmap_page_range+0xf96/0x2500 mm/memory.c:1576
unmap_vmas+0x131/0x250 mm/memory.c:1653
exit_mmap+0x3b9/0x640 mm/mmap.c:3216
__mmput+0x115/0x3b0 kernel/fork.c:1127
exit_mm+0x588/0x6e0 kernel/exit.c:550
do_exit+0x5a9/0x20c0 kernel/exit.c:870
do_group_exit+0x12e/0x300 kernel/exit.c:997
get_signal+0x6ca/0x12c0 kernel/signal.c:2900
arch_do_signal_or_restart+0xe7/0x12c0 arch/x86/kernel/signal.c:867
handle_signal_work kernel/entry/common.c:154 [inline]
exit_to_user_mode_loop+0x9e/0x130 kernel/entry/common.c:178
exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214
__syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307
do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f100fa78eb9
Code: Unable to access opcode bytes at RIP 0x7f100fa78e8f.
RSP: 002b:00007f100dcd40e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f100fcf3fa8 RCX: 00007f100fa78eb9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f100fcf3fa8
RBP: 00007f100fcf3fa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f100fcf4038 R14: 00007ffc03b43e10 R15: 00007ffc03b43ef8
Allocated by task 4251:
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:607 [inline]
kzalloc include/linux/slab.h:738 [inline]
xpad_probe+0x3f6/0x1b20 drivers/input/joystick/xpad.c:1790
usb_probe_interface+0x5c5/0xb20 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+0x184/0x210 drivers/base/bus.c:429
__device_attach+0x2a8/0x480 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+0x184/0x210 drivers/base/bus.c:429
__device_attach+0x2a8/0x480 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+0xd65/0x1660 drivers/usb/core/hub.c:2632
hub_port_connect drivers/usb/core/hub.c:5497 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5637 [inline]
port_event drivers/usb/core/hub.c:5799 [inline]
hub_event+0x2e4a/0x55e0 drivers/usb/core/hub.c:5881
process_one_work+0x85f/0x1010 kernel/workqueue.c:2310
worker_thread+0xaa6/0x1290 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 4295:
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+0xea/0x170 mm/slub.c:1736
slab_free mm/slub.c:3504 [inline]
kfree+0xef/0x2a0 mm/slub.c:4564
xpad_disconnect+0x34c/0x470 drivers/input/joystick/xpad.c:1938
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+0x6af/0xaf0 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:2287
hub_port_connect drivers/usb/core/hub.c:5341 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5637 [inline]
port_event drivers/usb/core/hub.c:5799 [inline]
hub_event+0x1ecb/0x55e0 drivers/usb/core/hub.c:5881
process_one_work+0x85f/0x1010 kernel/workqueue.c:2310
worker_thread+0xaa6/0x1290 kernel/workqueue.c:2457
kthread+0x436/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
The buggy address belongs to the object at ffff88802b8f5800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 145 bytes inside of
1024-byte region [ffff88802b8f5800, ffff88802b8f5c00)
The buggy address belongs to the page:
page:ffffea0000ae3c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2b8f0
head:ffffea0000ae3c00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea0005202c00 0000000600000006 ffff888016c41dc0
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 0x152a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 1277, ts 77263880055, free_ts 76963765020
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x1bbd/0x1ca0 mm/page_alloc.c:4192
__alloc_pages+0x1ee/0x480 mm/page_alloc.c:5487
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+0x80a/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+0x1cd/0x330 mm/slub.c:4408
kmalloc include/linux/slab.h:612 [inline]
kzalloc include/linux/slab.h:738 [inline]
ieee802_11_parse_elems_crc+0xb3/0x10b0 net/mac80211/util.c:1478
ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2243 [inline]
ieee80211_bss_info_update+0x751/0xa70 net/mac80211/scan.c:212
ieee80211_rx_bss_info net/mac80211/ibss.c:1123 [inline]
ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1614 [inline]
ieee80211_ibss_rx_queued_mgmt+0x1700/0x2ab0 net/mac80211/ibss.c:1643
ieee80211_iface_process_skb net/mac80211/iface.c:1459 [inline]
ieee80211_iface_work+0x70e/0xc60 net/mac80211/iface.c:1513
process_one_work+0x85f/0x1010 kernel/workqueue.c:2310
worker_thread+0xaa6/0x1290 kernel/workqueue.c:2457
kthread+0x436/0x520 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
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
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:3225 [inline]
kmem_cache_alloc_node+0x12d/0x2d0 mm/slub.c:3261
__alloc_skb+0xf4/0x750 net/core/skbuff.c:415
alloc_skb include/linux/skbuff.h:1162 [inline]
netlink_alloc_large_skb net/netlink/af_netlink.c:1182 [inline]
netlink_sendmsg+0x654/0xbe0 net/netlink/af_netlink.c:1893
sock_sendmsg_nosec net/socket.c:706 [inline]
__sock_sendmsg net/socket.c:718 [inline]
____sys_sendmsg+0x5b7/0x8f0 net/socket.c:2445
___sys_sendmsg+0x236/0x2e0 net/socket.c:2499
__sys_sendmsg net/socket.c:2528 [inline]
__do_sys_sendmsg net/socket.c:2537 [inline]
__se_sys_sendmsg+0x1af/0x290 net/socket.c:2535
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:
ffff88802b8f5780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88802b8f5800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88802b8f5880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88802b8f5900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88802b8f5980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: f0 48 c1 e8 03 lock shr $0x3,%rax
5: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1)
a: 74 08 je 0x14
c: 4c 89 f7 mov %r14,%rdi
f: e8 f0 51 59 00 call 0x595204
14: 48 c7 c3 08 b3 03 00 mov $0x3b308,%rbx
1b: 49 03 1e add (%r14),%rbx
1e: 48 89 d8 mov %rbx,%rax
21: 48 c1 e8 03 shr $0x3,%rax
25: 42 0f b6 04 38 movzbl (%rax,%r15,1),%eax
* 2a: 84 c0 test %al,%al <-- trapping instruction
2c: 75 2b jne 0x59
2e: 8b 03 mov (%rbx),%eax
30: 65 ff 0d d5 9d 9d 7e decl %gs:0x7e9d9dd5(%rip) # 0x7e9d9e0c
37: 74 08 je 0x41
39: 24 01 and $0x1,%al
3b: 5b pop %rbx
3c: 41 5e pop %r14
3e: 41 5f pop %r15