xpad 2-1:179.65: xpad_irq_in - usb_submit_urb failed with result -19
xpad 2-1:179.65: xpad_irq_out - usb_submit_urb failed with result -19
==================================================================
BUG: KASAN: use-after-free in register_lock_class+0x7e9/0x880 kernel/locking/lockdep.c:1294
Read of size 1 at addr ffff88807aebe091 by task syz.4.20/4399
CPU: 0 PID: 4399 Comm: syz.4.20 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
<IRQ>
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
register_lock_class+0x7e9/0x880 kernel/locking/lockdep.c:1294
__lock_acquire+0x160/0x7c60 kernel/locking/lockdep.c:4891
lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xa4/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:1988
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
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
RIP: 0010:preempt_count arch/x86/include/asm/preempt.h:27 [inline]
RIP: 0010:check_kcov_mode kernel/kcov.c:172 [inline]
RIP: 0010:write_comp_data kernel/kcov.c:227 [inline]
RIP: 0010:__sanitizer_cov_trace_const_cmp8+0xc/0x80 kernel/kcov.c:300
Code: 44 02 08 05 00 00 00 4a 89 7c 02 10 4a 89 74 02 18 4a 89 44 02 20 48 ff c1 48 89 0a c3 90 48 8b 04 24 65 48 8b 0d c4 9f 8a 7e <65> 8b 15 c5 9f 8a 7e 81 e2 00 01 ff 00 74 11 81 fa 00 01 00 00 75
RSP: 0000:ffffc900031cfc78 EFLAGS: 00000246
RAX: ffffffff81a08d8f RBX: ffffea0001cb3ec0 RCX: ffff888029ff8000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: dffffc0000000000 R09: fffff940003967d9
R10: fffff940003967d9 R11: 1ffffd40003967d8 R12: 00fff00000080004
R13: dffffc0000000000 R14: ffffea0001cb3ec8 R15: 00fff00000080004
lru_cache_add+0x2cf/0x750 mm/swap.c:447
do_anonymous_page mm/memory.c:3878 [inline]
handle_pte_fault mm/memory.c:4648 [inline]
__handle_mm_fault mm/memory.c:4785 [inline]
handle_mm_fault+0x37ce/0x43b0 mm/memory.c:4883
do_user_addr_fault+0x489/0xc80 arch/x86/mm/fault.c:1357
handle_page_fault arch/x86/mm/fault.c:1445 [inline]
exc_page_fault+0x60/0x100 arch/x86/mm/fault.c:1501
asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:606
RIP: 0033:0x7ff5543369f0
Code: 39 4f 08 72 4c 8d 4d ff 85 ed 74 33 66 0f 1f 44 00 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 49 89 47 10 83 e9 01 73 d3 41
RSP: 002b:00007ff5526db4a0 EFLAGS: 00010282
RAX: 00000000000e4000 RBX: 00007ff5526db540 RCX: 0000000000000016
RDX: 00000000000003ff RSI: 0000000000000200 RDI: 00007ff5526db5e0
RBP: 00000000000000e8 R08: 00007ff54a2bc000 R09: 00000000000000fe
R10: 000020000001c302 R11: 000000000000968e R12: 0000000000000181
R13: 00007ff554515c40 R14: 0000000000000011 R15: 00007ff5526db5e0
</TASK>
Allocated by task 4300:
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+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: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+0x2dd9/0x5560 drivers/usb/core/hub.c:5881
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 21:
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+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: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+0x1e9f/0x5560 drivers/usb/core/hub.c:5881
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
The buggy address belongs to the object at ffff88807aebe000
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 145 bytes inside of
1024-byte region [ffff88807aebe000, ffff88807aebe400)
The buggy address belongs to the page:
page:ffffea0001ebae00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7aeb8
head:ffffea0001ebae00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 dead000000000100 dead000000000122 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 4156, ts 55169917984, free_ts 55132993190
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: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+0x81e/0xdf0 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]
load_elf_phdrs+0x132/0x230 fs/binfmt_elf.c:480
load_elf_binary+0x954/0x2890 fs/binfmt_elf.c:960
search_binary_handler fs/exec.c:1742 [inline]
exec_binprm fs/exec.c:1783 [inline]
bprm_execve+0xa92/0x17d0 fs/exec.c:1852
do_execveat_common+0x51e/0x6d0 fs/exec.c:1957
do_execve fs/exec.c:2027 [inline]
__do_sys_execve fs/exec.c:2103 [inline]
__se_sys_execve fs/exec.c:2098 [inline]
__x64_sys_execve+0x8e/0xa0 fs/exec.c:2098
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
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:2020 [inline]
discard_slab mm/slub.c:2026 [inline]
__unfreeze_partials+0x1a5/0x200 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/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]
slab_alloc mm/slub.c:3233 [inline]
kmem_cache_alloc_trace+0x103/0x2a0 mm/slub.c:3250
kmalloc include/linux/slab.h:607 [inline]
kzalloc include/linux/slab.h:738 [inline]
tomoyo_print_bprm security/tomoyo/audit.c:26 [inline]
tomoyo_init_log+0xff9/0x1e40 security/tomoyo/audit.c:264
tomoyo_supervisor+0x34e/0x10d0 security/tomoyo/common.c:2097
tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline]
tomoyo_env_perm+0x146/0x1e0 security/tomoyo/environ.c:63
tomoyo_environ security/tomoyo/domain.c:672 [inline]
tomoyo_find_next_domain+0x1593/0x1a60 security/tomoyo/domain.c:882
tomoyo_bprm_check_security+0xdd/0x120 security/tomoyo/tomoyo.c:101
security_bprm_check+0x5e/0x90 security/security.c:868
search_binary_handler fs/exec.c:1730 [inline]
exec_binprm fs/exec.c:1783 [inline]
bprm_execve+0x9f7/0x17d0 fs/exec.c:1852
Memory state around the buggy address:
ffff88807aebdf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807aebe000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807aebe080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807aebe100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807aebe180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 44 02 08 add (%rax),%r9b
3: 05 00 00 00 4a add $0x4a000000,%eax
8: 89 7c 02 10 mov %edi,0x10(%rdx,%rax,1)
c: 4a 89 74 02 18 mov %rsi,0x18(%rdx,%r8,1)
11: 4a 89 44 02 20 mov %rax,0x20(%rdx,%r8,1)
16: 48 ff c1 inc %rcx
19: 48 89 0a mov %rcx,(%rdx)
1c: c3 ret
1d: 90 nop
1e: 48 8b 04 24 mov (%rsp),%rax
22: 65 48 8b 0d c4 9f 8a mov %gs:0x7e8a9fc4(%rip),%rcx # 0x7e8a9fee
29: 7e
* 2a: 65 8b 15 c5 9f 8a 7e mov %gs:0x7e8a9fc5(%rip),%edx # 0x7e8a9ff6 <-- trapping instruction
31: 81 e2 00 01 ff 00 and $0xff0100,%edx
37: 74 11 je 0x4a
39: 81 fa 00 01 00 00 cmp $0x100,%edx
3f: 75 .byte 0x75