xpad 3-1:179.65: xpad_irq_in - usb_submit_urb failed with result -19
xpad 3-1:179.65: xpad_irq_out - usb_submit_urb failed with result -19
==================================================================
BUG: KASAN: use-after-free in register_lock_class+0x8ff/0x9a0 kernel/locking/lockdep.c:1294
Read of size 1 at addr ffff88807a64b891 by task syz-executor.2/4778
CPU: 1 PID: 4778 Comm: syz-executor.2 Not tainted 5.15.161-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
print_address_description+0x63/0x3b0 mm/kasan/report.c:248
__kasan_report mm/kasan/report.c:434 [inline]
kasan_report+0x16b/0x1c0 mm/kasan/report.c:451
register_lock_class+0x8ff/0x9a0 kernel/locking/lockdep.c:1294
__lock_acquire+0xd7/0x1ff0 kernel/locking/lockdep.c:4891
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162
__wake_up_common_lock kernel/sched/wait.c:137 [inline]
__wake_up+0xf5/0x1c0 kernel/sched/wait.c:157
__usb_hcd_giveback_urb+0x3a8/0x530 drivers/usb/core/hcd.c:1677
dummy_timer+0x8ad/0x3200 drivers/usb/gadget/udc/dummy_hcd.c:1987
call_timer_fn+0x16d/0x560 kernel/time/timer.c:1451
expire_timers kernel/time/timer.c:1496 [inline]
__run_timers+0x67c/0x890 kernel/time/timer.c:1767
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1780
handle_softirqs+0x3a7/0x930 kernel/softirq.c:558
__do_softirq kernel/softirq.c:592 [inline]
invoke_softirq kernel/softirq.c:432 [inline]
__irq_exit_rcu+0x157/0x240 kernel/softirq.c:641
irq_exit_rcu+0x5/0x20 kernel/softirq.c:653
sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1096
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:rcu_preempt_read_exit kernel/rcu/tree_plugin.h:380 [inline]
RIP: 0010:__rcu_read_unlock+0x2f/0x100 kernel/rcu/tree_plugin.h:419
Code: 41 55 41 54 53 49 bc 00 00 00 00 00 fc ff df 65 4c 8b 35 c4 aa 96 7e 4d 8d ae 3c 04 00 00 4c 89 eb 48 c1 eb 03 42 0f b6 04 23 <84> c0 75 61 41 8b 6d 00 ff cd 42 0f b6 04 23 84 c0 75 69 41 89 6d
RSP: 0018:ffffc90002ea78c8 EFLAGS: 00000a07
RAX: 0000000000000000 RBX: 1ffff11003bc5087 RCX: ffff88801de28000
RDX: 0000000000000000 RSI: ffffffff8ad8f720 RDI: ffffffff8ad8f6e0
RBP: 0000000000000000 R08: ffffffff818cfdb9 R09: fffffbfff1f7f219
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff88801de2843c R14: ffff88801de28000 R15: 0000000000000122
rcu_read_unlock include/linux/rcupdate.h:771 [inline]
is_bpf_text_address+0x24a/0x260 kernel/bpf/core.c:723
kernel_text_address kernel/extable.c:151 [inline]
__kernel_text_address+0x94/0x100 kernel/extable.c:105
unwind_get_return_address+0x49/0x80 arch/x86/kernel/unwind_orc.c:323
arch_stack_walk+0xf3/0x140 arch/x86/kernel/stacktrace.c:26
stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122
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_slab_alloc+0x8e/0xc0 mm/kasan/common.c:467
kasan_slab_alloc include/linux/kasan.h:254 [inline]
slab_post_alloc_hook+0x53/0x380 mm/slab.h:519
slab_alloc_node mm/slub.c:3220 [inline]
slab_alloc mm/slub.c:3228 [inline]
kmem_cache_alloc+0xf3/0x280 mm/slub.c:3233
getname_flags+0xb8/0x4e0 fs/namei.c:138
user_path_at_empty+0x2a/0x180 fs/namei.c:2882
user_path_at include/linux/namei.h:57 [inline]
ksys_umount fs/namespace.c:1779 [inline]
__do_sys_umount fs/namespace.c:1787 [inline]
__se_sys_umount fs/namespace.c:1785 [inline]
__x64_sys_umount+0xf0/0x170 fs/namespace.c:1785
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f777f95f257
Code: b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 b0 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffcdf0d71f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f777f95f257
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffcdf0d72b0
RBP: 00007ffcdf0d72b0 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffcdf0d8360
R13: 00007f777f9ba6c6 R14: 000000000001e886 R15: 0000000000000021
Allocated by task 3572:
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+0xba/0xf0 mm/kasan/common.c:513
kasan_kmalloc include/linux/kasan.h:264 [inline]
kmem_cache_alloc_trace+0x143/0x290 mm/slub.c:3247
kmalloc include/linux/slab.h:591 [inline]
kzalloc include/linux/slab.h:721 [inline]
xpad_probe+0x3eb/0x1b10 drivers/input/joystick/xpad.c:1786
usb_probe_interface+0x5c0/0xaf0 drivers/usb/core/driver.c:396
really_probe+0x24e/0xb60 drivers/base/dd.c:595
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:755
driver_probe_device+0x50/0x420 drivers/base/dd.c:785
__device_attach_driver+0x2b9/0x500 drivers/base/dd.c:907
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
__device_attach+0x359/0x570 drivers/base/dd.c:979
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:487
device_add+0xb48/0xfd0 drivers/base/core.c:3409
usb_set_configuration+0x19dd/0x2020 drivers/usb/core/message.c:2165
usb_generic_driver_probe+0x84/0x140 drivers/usb/core/generic.c:238
usb_probe_device+0x130/0x260 drivers/usb/core/driver.c:293
really_probe+0x24e/0xb60 drivers/base/dd.c:595
__driver_probe_device+0x1a2/0x3d0 drivers/base/dd.c:755
driver_probe_device+0x50/0x420 drivers/base/dd.c:785
__device_attach_driver+0x2b9/0x500 drivers/base/dd.c:907
bus_for_each_drv+0x183/0x200 drivers/base/bus.c:427
__device_attach+0x359/0x570 drivers/base/dd.c:979
bus_probe_device+0xba/0x1e0 drivers/base/bus.c:487
device_add+0xb48/0xfd0 drivers/base/core.c:3409
usb_new_device+0xc17/0x18e0 drivers/usb/core/hub.c:2593
hub_port_connect drivers/usb/core/hub.c:5455 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5595 [inline]
port_event drivers/usb/core/hub.c:5741 [inline]
hub_event+0x2cdf/0x54c0 drivers/usb/core/hub.c:5823
process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
kthread+0x3f6/0x4f0 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300
Freed by task 4876:
kasan_save_stack mm/kasan/common.c:38 [inline]
kasan_set_track+0x4b/0x80 mm/kasan/common.c:46
kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
____kasan_slab_free+0xd8/0x120 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+0xdd/0x160 mm/slub.c:1731
slab_free mm/slub.c:3499 [inline]
kfree+0xf1/0x270 mm/slub.c:4559
xpad_disconnect+0x355/0x480 drivers/input/joystick/xpad.c:1934
usb_unbind_interface+0x1cd/0x840 drivers/usb/core/driver.c:458
__device_release_driver drivers/base/dd.c:1229 [inline]
device_release_driver_internal+0x50e/0x7f0 drivers/base/dd.c:1262
bus_remove_device+0x2e5/0x400 drivers/base/bus.c:529
device_del+0x6e2/0xbd0 drivers/base/core.c:3597
usb_disable_device+0x3b8/0x840 drivers/usb/core/message.c:1414
usb_disconnect+0x33c/0x8c0 drivers/usb/core/hub.c:2248
hub_port_connect drivers/usb/core/hub.c:5299 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5595 [inline]
port_event drivers/usb/core/hub.c:5741 [inline]
hub_event+0x1d58/0x54c0 drivers/usb/core/hub.c:5823
process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
kthread+0x3f6/0x4f0 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300
The buggy address belongs to the object at ffff88807a64b800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 145 bytes inside of
1024-byte region [ffff88807a64b800, ffff88807a64bc00)
The buggy address belongs to the page:
page:ffffea0001e99200 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88807a648800 pfn:0x7a648
head:ffffea0001e99200 order:3 compound_mapcount:0 compound_pincount:0
flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000010200 ffffea00017aea08 ffffea0001782808 ffff888011c41dc0
raw: ffff88807a648800 000000000010000c 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 3517, ts 108937860741, free_ts 104477744033
prep_new_page mm/page_alloc.c:2426 [inline]
get_page_from_freelist+0x322a/0x33c0 mm/page_alloc.c:4159
__alloc_pages+0x272/0x700 mm/page_alloc.c:5423
alloc_slab_page mm/slub.c:1775 [inline]
allocate_slab mm/slub.c:1912 [inline]
new_slab+0xbb/0x4b0 mm/slub.c:1975
___slab_alloc+0x6f6/0xe10 mm/slub.c:3008
__slab_alloc mm/slub.c:3095 [inline]
slab_alloc_node mm/slub.c:3186 [inline]
slab_alloc mm/slub.c:3228 [inline]
__kmalloc+0x1c9/0x300 mm/slub.c:4403
kmalloc include/linux/slab.h:596 [inline]
kzalloc include/linux/slab.h:721 [inline]
neigh_alloc net/core/neighbour.c:438 [inline]
___neigh_create+0x6be/0x2220 net/core/neighbour.c:591
ip6_finish_output2+0x11aa/0x14f0 net/ipv6/ip6_output.c:123
dst_output include/net/dst.h:443 [inline]
NF_HOOK+0x166/0x4f0 include/linux/netfilter.h:302
mld_sendpack+0x70e/0xc10 net/ipv6/mcast.c:1820
mld_send_cr net/ipv6/mcast.c:2121 [inline]
mld_ifc_work+0x7d7/0xc90 net/ipv6/mcast.c:2653
process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
kthread+0x3f6/0x4f0 kernel/kthread.c:334
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300
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+0xc34/0xcf0 mm/page_alloc.c:3317
free_unref_page+0x95/0x2d0 mm/page_alloc.c:3396
free_slab mm/slub.c:2015 [inline]
discard_slab mm/slub.c:2021 [inline]
__unfreeze_partials+0x1b7/0x210 mm/slub.c:2507
put_cpu_partial+0x132/0x1a0 mm/slub.c:2587
do_slab_free mm/slub.c:3487 [inline]
___cache_free+0xe3/0x100 mm/slub.c:3506
qlist_free_all+0x36/0x90 mm/kasan/quarantine.c:176
kasan_quarantine_reduce+0x162/0x180 mm/kasan/quarantine.c:283
__kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444
kasan_slab_alloc include/linux/kasan.h:254 [inline]
slab_post_alloc_hook+0x53/0x380 mm/slab.h:519
slab_alloc_node mm/slub.c:3220 [inline]
kmem_cache_alloc_node+0x121/0x2c0 mm/slub.c:3256
__alloc_skb+0xdd/0x590 net/core/skbuff.c:415
alloc_skb include/linux/skbuff.h:1167 [inline]
nlmsg_new include/net/netlink.h:953 [inline]
rtmsg_ifa+0x1e7/0x3a0 net/ipv4/devinet.c:1913
__inet_del_ifa+0x867/0x1020 net/ipv4/devinet.c:427
inet_del_ifa net/ipv4/devinet.c:465 [inline]
inetdev_destroy net/ipv4/devinet.c:318 [inline]
inetdev_event+0x62b/0x1490 net/ipv4/devinet.c:1598
notifier_call_chain kernel/notifier.c:83 [inline]
raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391
call_netdevice_notifiers_info net/core/dev.c:2018 [inline]
call_netdevice_notifiers_extack net/core/dev.c:2030 [inline]
call_netdevice_notifiers net/core/dev.c:2044 [inline]
unregister_netdevice_many+0xf1b/0x18f0 net/core/dev.c:11094
Memory state around the buggy address:
ffff88807a64b780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807a64b800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88807a64b880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807a64b900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807a64b980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 41 55 push %r13
2: 41 54 push %r12
4: 53 push %rbx
5: 49 bc 00 00 00 00 00 movabs $0xdffffc0000000000,%r12
c: fc ff df
f: 65 4c 8b 35 c4 aa 96 mov %gs:0x7e96aac4(%rip),%r14 # 0x7e96aadb
16: 7e
17: 4d 8d ae 3c 04 00 00 lea 0x43c(%r14),%r13
1e: 4c 89 eb mov %r13,%rbx
21: 48 c1 eb 03 shr $0x3,%rbx
25: 42 0f b6 04 23 movzbl (%rbx,%r12,1),%eax
* 2a: 84 c0 test %al,%al <-- trapping instruction
2c: 75 61 jne 0x8f
2e: 41 8b 6d 00 mov 0x0(%r13),%ebp
32: ff cd dec %ebp
34: 42 0f b6 04 23 movzbl (%rbx,%r12,1),%eax
39: 84 c0 test %al,%al
3b: 75 69 jne 0xa6
3d: 41 rex.B
3e: 89 .byte 0x89
3f: 6d insl (%dx),%es:(%rdi)