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+0x8d1/0x980 kernel/locking/lockdep.c:1332
Read of size 1 at addr ffff888149a6c891 by task rm/8847
CPU: 0 UID: 0 PID: 8847 Comm: rm Not tainted 6.11.0-rc2-syzkaller-00042-gcf6d429eb656 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Call Trace:
__dump_stack lib/dump_stack.c:93 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119
print_address_description mm/kasan/report.c:377 [inline]
print_report+0x169/0x550 mm/kasan/report.c:488
kasan_report+0x143/0x180 mm/kasan/report.c:601
register_lock_class+0x8d1/0x980 kernel/locking/lockdep.c:1332
__lock_acquire+0xf0/0x2040 kernel/locking/lockdep.c:5019
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162
__wake_up_common_lock+0x25/0x1e0 kernel/sched/wait.c:105
__usb_hcd_giveback_urb+0x4ff/0x6e0 drivers/usb/core/hcd.c:1653
dummy_timer+0x830/0x45a0 drivers/usb/gadget/udc/dummy_hcd.c:1987
__run_hrtimer kernel/time/hrtimer.c:1689 [inline]
__hrtimer_run_queues+0x59b/0xd50 kernel/time/hrtimer.c:1753
hrtimer_interrupt+0x396/0x990 kernel/time/hrtimer.c:1815
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline]
__sysvec_apic_timer_interrupt+0x110/0x3f0 arch/x86/kernel/apic/apic.c:1049
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:mt_slot lib/maple_tree.c:788 [inline]
RIP: 0010:mas_slot lib/maple_tree.c:821 [inline]
RIP: 0010:mt_validate_nulls lib/maple_tree.c:7542 [inline]
RIP: 0010:mt_validate+0x421d/0x4aa0 lib/maple_tree.c:7596
Code: c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 eb 0a 4f f6 48 8b 03 48 89 44 24 08 e8 ee 26 0a 00 89 c3 31 ff 89 c6 e8 13 d1 e7 f5 <85> db 74 7b 49 8d 5e 40 48 89 d8 48 c1 e8 03 42 0f b6 04 28 84 c0
RSP: 0018:ffffc900042bf420 EFLAGS: 00000293
RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffff8880255a0000
RDX: ffff8880255a0000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc900042bf610 R08: ffffffff8babaa1d R09: ffffffff8babab75
R10: 0000000000000003 R11: ffff8880255a0000 R12: 1ffff92000857ea7
R13: dffffc0000000000 R14: ffff88802d03e8c0 R15: ffff888070a615d0
validate_mm+0xe7/0x530 mm/mmap.c:329
do_vmi_align_munmap+0x15dd/0x18c0 mm/mmap.c:2759
do_vmi_munmap+0x261/0x2f0 mm/mmap.c:2830
mmap_region+0x72f/0x2090 mm/mmap.c:2881
do_mmap+0x8f9/0x1010 mm/mmap.c:1468
vm_mmap_pgoff+0x1dd/0x3d0 mm/util.c:588
ksys_mmap_pgoff+0x4f1/0x720 mm/mmap.c:1514
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f3a395adb74
Code: 63 08 44 89 e8 5b 41 5c 41 5d c3 41 89 ca 41 f7 c1 ff 0f 00 00 74 0c c7 05 f5 46 01 00 16 00 00 00 eb 17 b8 09 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 0c f7 d8 89 05 dc 46 01 00 48 83 c8 ff c3 0f
RSP: 002b:00007ffe5335f738 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007ffe5335f7e8 RCX: 00007f3a395adb74
RDX: 0000000000000003 RSI: 0000000000002000 RDI: 00007f3a392dc000
RBP: 00007ffe5335fad0 R08: 0000000000000003 R09: 0000000000052000
R10: 0000000000000812 R11: 0000000000000246 R12: 00007f3a3958a570
R13: 00007ffe5335fb58 R14: 0000000000052120 R15: 0000000000000000
Allocated by task 5286:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:370 [inline]
__kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:387
kasan_kmalloc include/linux/kasan.h:211 [inline]
__kmalloc_cache_noprof+0x19c/0x2c0 mm/slub.c:4189
kmalloc_noprof include/linux/slab.h:681 [inline]
kzalloc_noprof include/linux/slab.h:807 [inline]
xpad_probe+0x3c8/0x1b90 drivers/input/joystick/xpad.c:2026
usb_probe_interface+0x645/0xbb0 drivers/usb/core/driver.c:399
really_probe+0x2b8/0xad0 drivers/base/dd.c:657
__driver_probe_device+0x1a2/0x390 drivers/base/dd.c:799
driver_probe_device+0x50/0x430 drivers/base/dd.c:829
__device_attach_driver+0x2d6/0x530 drivers/base/dd.c:957
bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:457
__device_attach+0x333/0x520 drivers/base/dd.c:1029
bus_probe_device+0x189/0x260 drivers/base/bus.c:532
device_add+0x856/0xbf0 drivers/base/core.c:3679
usb_set_configuration+0x1976/0x1fb0 drivers/usb/core/message.c:2210
usb_generic_driver_probe+0x88/0x140 drivers/usb/core/generic.c:254
usb_probe_device+0x1b8/0x380 drivers/usb/core/driver.c:294
really_probe+0x2b8/0xad0 drivers/base/dd.c:657
__driver_probe_device+0x1a2/0x390 drivers/base/dd.c:799
driver_probe_device+0x50/0x430 drivers/base/dd.c:829
__device_attach_driver+0x2d6/0x530 drivers/base/dd.c:957
bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:457
__device_attach+0x333/0x520 drivers/base/dd.c:1029
bus_probe_device+0x189/0x260 drivers/base/bus.c:532
device_add+0x856/0xbf0 drivers/base/core.c:3679
usb_new_device+0x104a/0x19a0 drivers/usb/core/hub.c:2651
hub_port_connect drivers/usb/core/hub.c:5521 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5661 [inline]
port_event drivers/usb/core/hub.c:5821 [inline]
hub_event+0x2d6a/0x5150 drivers/usb/core/hub.c:5903
process_one_work kernel/workqueue.c:3231 [inline]
process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312
worker_thread+0x86d/0xd40 kernel/workqueue.c:3390
kthread+0x2f0/0x390 kernel/kthread.c:389
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 5287:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579
poison_slab_object+0xe0/0x150 mm/kasan/common.c:240
__kasan_slab_free+0x37/0x60 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2252 [inline]
slab_free mm/slub.c:4473 [inline]
kfree+0x149/0x360 mm/slub.c:4594
xpad_disconnect+0x359/0x490 drivers/input/joystick/xpad.c:2207
usb_unbind_interface+0x25e/0x940 drivers/usb/core/driver.c:461
device_remove drivers/base/dd.c:568 [inline]
__device_release_driver drivers/base/dd.c:1272 [inline]
device_release_driver_internal+0x503/0x7c0 drivers/base/dd.c:1295
bus_remove_device+0x34f/0x420 drivers/base/bus.c:574
device_del+0x57a/0x9b0 drivers/base/core.c:3868
usb_disable_device+0x3bf/0x850 drivers/usb/core/message.c:1418
usb_disconnect+0x340/0x950 drivers/usb/core/hub.c:2304
hub_port_connect drivers/usb/core/hub.c:5361 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5661 [inline]
port_event drivers/usb/core/hub.c:5821 [inline]
hub_event+0x1eb9/0x5150 drivers/usb/core/hub.c:5903
process_one_work kernel/workqueue.c:3231 [inline]
process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312
worker_thread+0x86d/0xd40 kernel/workqueue.c:3390
kthread+0x2f0/0x390 kernel/kthread.c:389
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff888149a6c800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 145 bytes inside of
freed 1024-byte region [ffff888149a6c800, ffff888149a6cc00)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x149a68
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x57ff00000000040(head|node=1|zone=2|lastcpupid=0x7ff)
page_type: 0xfdffffff(slab)
raw: 057ff00000000040 ffff888015841dc0 dead000000000100 dead000000000122
raw: 0000000000000000 0000000000100010 00000001fdffffff 0000000000000000
head: 057ff00000000040 ffff888015841dc0 dead000000000100 dead000000000122
head: 0000000000000000 0000000000100010 00000001fdffffff 0000000000000000
head: 057ff00000000003 ffffea0005269a01 ffffffffffffffff 0000000000000000
head: 0000000000000008 0000000000000000 00000000ffffffff 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 0x352800(GFP_NOWAIT|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 5248, tgid 5248 (syz-executor), ts 82076866709, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1493
prep_new_page mm/page_alloc.c:1501 [inline]
get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3442
__alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4700
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x5f/0x120 mm/slub.c:2321
allocate_slab+0x5a/0x2f0 mm/slub.c:2484
new_slab mm/slub.c:2537 [inline]
___slab_alloc+0xcd1/0x14b0 mm/slub.c:3723
__slab_alloc+0x58/0xa0 mm/slub.c:3813
__slab_alloc_node mm/slub.c:3866 [inline]
slab_alloc_node mm/slub.c:4025 [inline]
__kmalloc_cache_node_noprof+0x20c/0x300 mm/slub.c:4197
kmalloc_node_noprof include/linux/slab.h:704 [inline]
shrinker_unit_alloc mm/shrinker.c:50 [inline]
alloc_shrinker_info+0x183/0x420 mm/shrinker.c:90
mem_cgroup_css_online+0x2c/0x420 mm/memcontrol.c:3664
online_css+0xbb/0x260 kernel/cgroup/cgroup.c:5514
css_create kernel/cgroup/cgroup.c:5585 [inline]
cgroup_apply_control_enable+0x7d7/0xaf0 kernel/cgroup/cgroup.c:3232
cgroup_mkdir+0xa52/0xd30 kernel/cgroup/cgroup.c:5778
kernfs_iop_mkdir+0x253/0x3f0 fs/kernfs/dir.c:1246
vfs_mkdir+0x2f9/0x4f0 fs/namei.c:4210
do_mkdirat+0x264/0x3a0 fs/namei.c:4233
page_owner free stack trace missing
Memory state around the buggy address:
ffff888149a6c780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888149a6c800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888149a6c880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888149a6c900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888149a6c980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: c1 e8 03 shr $0x3,%eax
3: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1)
8: 74 08 je 0x12
a: 48 89 df mov %rbx,%rdi
d: e8 eb 0a 4f f6 call 0xf64f0afd
12: 48 8b 03 mov (%rbx),%rax
15: 48 89 44 24 08 mov %rax,0x8(%rsp)
1a: e8 ee 26 0a 00 call 0xa270d
1f: 89 c3 mov %eax,%ebx
21: 31 ff xor %edi,%edi
23: 89 c6 mov %eax,%esi
25: e8 13 d1 e7 f5 call 0xf5e7d13d
* 2a: 85 db test %ebx,%ebx <-- trapping instruction
2c: 74 7b je 0xa9
2e: 49 8d 5e 40 lea 0x40(%r14),%rbx
32: 48 89 d8 mov %rbx,%rax
35: 48 c1 e8 03 shr $0x3,%rax
39: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax
3e: 84 c0 test %al,%al