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: slab-use-after-free in register_lock_class+0x8db/0x980 kernel/locking/lockdep.c:1342
Read of size 1 at addr ffff88805f0c7891 by task syz-executor.4/5111
CPU: 0 PID: 5111 Comm: syz-executor.4 Not tainted 6.10.0-rc3-next-20240611-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:91 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:117
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+0x8db/0x980 kernel/locking/lockdep.c:1342
__lock_acquire+0xd5/0x2000 kernel/locking/lockdep.c:5069
lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5817
__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/0x45d0 drivers/usb/gadget/udc/dummy_hcd.c:1987
__run_hrtimer kernel/time/hrtimer.c:1687 [inline]
__hrtimer_run_queues+0x59b/0xd50 kernel/time/hrtimer.c:1751
hrtimer_interrupt+0x396/0x990 kernel/time/hrtimer.c:1813
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:obj_cgroup_charge+0x34f/0x630 mm/memcontrol.c:3675
Code: 44 24 60 42 80 3c 23 00 74 08 4c 89 ff e8 79 fa f7 ff f6 44 24 61 02 0f 85 0c 01 00 00 41 f7 c5 00 02 00 00 74 01 fb 45 31 ed <80> 7c 24 0c 00 0f 85 88 00 00 00 4c 89 f0 48 c1 e8 0c 31 db 41 81
RSP: 0018:ffffc90003547660 EFLAGS: 00000246
RAX: e21632a21d5c7000 RBX: 1ffff920006a8ed8 RCX: ffffffff816fafba
RDX: dffffc0000000000 RSI: ffffffff8bcac1a0 RDI: ffffffff8c200760
RBP: ffffc90003547758 R08: ffffffff92fcb7ef R09: 1ffffffff25f96fd
R10: dffffc0000000000 R11: fffffbfff25f96fe R12: dffffc0000000000
R13: 0000000000000000 R14: 0000000000000118 R15: ffffc900035476c0
__memcg_slab_post_alloc_hook+0x1b1/0x7e0 mm/memcontrol.c:3768
memcg_slab_post_alloc_hook mm/slub.c:2122 [inline]
slab_post_alloc_hook mm/slub.c:3980 [inline]
slab_alloc_node mm/slub.c:4019 [inline]
kmem_cache_alloc_noprof+0x1de/0x2a0 mm/slub.c:4026
anon_vma_alloc mm/rmap.c:94 [inline]
anon_vma_fork+0xe8/0x580 mm/rmap.c:360
dup_mmap kernel/fork.c:709 [inline]
dup_mm kernel/fork.c:1669 [inline]
copy_mm+0xd63/0x1f30 kernel/fork.c:1718
copy_process+0x187a/0x3dc0 kernel/fork.c:2371
kernel_clone+0x226/0x8f0 kernel/fork.c:2778
__do_sys_clone kernel/fork.c:2921 [inline]
__se_sys_clone kernel/fork.c:2905 [inline]
__x64_sys_clone+0x258/0x2a0 kernel/fork.c:2905
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:0x7f8ab4879ed3
Code: 1f 84 00 00 00 00 00 64 48 8b 04 25 10 00 00 00 45 31 c0 31 d2 31 f6 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 89 c2 85 c0 75 2c 64 48 8b 04 25 10 00 00
RSP: 002b:00007ffeac797368 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f8ab4879ed3
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
R10: 0000555589e20750 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000001
Allocated by task 5204:
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:4171
kmalloc_noprof include/linux/slab.h:660 [inline]
kzalloc_noprof include/linux/slab.h:778 [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:656
__driver_probe_device+0x1a2/0x390 drivers/base/dd.c:798
driver_probe_device+0x50/0x430 drivers/base/dd.c:828
__device_attach_driver+0x2d6/0x530 drivers/base/dd.c:956
bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:457
__device_attach+0x333/0x520 drivers/base/dd.c:1028
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:656
__driver_probe_device+0x1a2/0x390 drivers/base/dd.c:798
driver_probe_device+0x50/0x430 drivers/base/dd.c:828
__device_attach_driver+0x2d6/0x530 drivers/base/dd.c:956
bus_for_each_drv+0x24e/0x2e0 drivers/base/bus.c:457
__device_attach+0x333/0x520 drivers/base/dd.c:1028
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:3248 [inline]
process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3329
worker_thread+0x86d/0xd50 kernel/workqueue.c:3409
kthread+0x2f0/0x390 kernel/kthread.c:389
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:144
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 25:
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:2214 [inline]
slab_free mm/slub.c:4455 [inline]
kfree+0x149/0x360 mm/slub.c:4576
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:1270 [inline]
device_release_driver_internal+0x503/0x7c0 drivers/base/dd.c:1293
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:3248 [inline]
process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3329
worker_thread+0x86d/0xd50 kernel/workqueue.c:3409
kthread+0x2f0/0x390 kernel/kthread.c:389
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:144
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff88805f0c7800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 145 bytes inside of
freed 1024-byte region [ffff88805f0c7800, ffff88805f0c7c00)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5f0c0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xfdffffff(slab)
raw: 00fff00000000040 ffff888015041dc0 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000100010 00000001fdffffff 0000000000000000
head: 00fff00000000040 ffff888015041dc0 0000000000000000 dead000000000001
head: 0000000000000000 0000000000100010 00000001fdffffff 0000000000000000
head: 00fff00000000003 ffffea00017c3001 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 0x152820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 2466, tgid 2466 (kworker/u8:7), ts 78679291531, free_ts 78629392649
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1470
prep_new_page mm/page_alloc.c:1478 [inline]
get_page_from_freelist+0x2cbd/0x2d70 mm/page_alloc.c:3457
__alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4715
__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:2283
allocate_slab+0x5a/0x2f0 mm/slub.c:2446
new_slab mm/slub.c:2499 [inline]
___slab_alloc+0xcd1/0x14b0 mm/slub.c:3685
__slab_alloc+0x58/0xa0 mm/slub.c:3775
__slab_alloc_node mm/slub.c:3828 [inline]
slab_alloc_node mm/slub.c:4007 [inline]
__do_kmalloc_node mm/slub.c:4139 [inline]
__kmalloc_noprof+0x257/0x400 mm/slub.c:4153
kmalloc_noprof include/linux/slab.h:664 [inline]
kzalloc_noprof include/linux/slab.h:778 [inline]
ieee802_11_parse_elems_full+0xdb/0x2880 net/mac80211/parse.c:958
ieee802_11_parse_elems_crc net/mac80211/ieee80211_i.h:2344 [inline]
ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2351 [inline]
ieee80211_inform_bss+0x15f/0x1080 net/mac80211/scan.c:79
rdev_inform_bss net/wireless/rdev-ops.h:418 [inline]
cfg80211_inform_single_bss_data+0x1121/0x2360 net/wireless/scan.c:2293
cfg80211_inform_bss_data+0x3dd/0x5a70 net/wireless/scan.c:3117
cfg80211_inform_bss_frame_data+0x3bc/0x720 net/wireless/scan.c:3207
ieee80211_bss_info_update+0x8a7/0xbc0 net/mac80211/scan.c:226
ieee80211_rx_bss_info net/mac80211/ibss.c:1099 [inline]
ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1578 [inline]
ieee80211_ibss_rx_queued_mgmt+0x1962/0x2d70 net/mac80211/ibss.c:1605
ieee80211_iface_process_skb net/mac80211/iface.c:1605 [inline]
ieee80211_iface_work+0x8a3/0xf10 net/mac80211/iface.c:1659
page last free pid 5121 tgid 5121 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1089 [inline]
free_unref_page+0xd22/0xea0 mm/page_alloc.c:2621
discard_slab mm/slub.c:2545 [inline]
__put_partials+0xeb/0x130 mm/slub.c:3013
put_cpu_partial+0x17c/0x250 mm/slub.c:3088
__slab_free+0x2ea/0x3d0 mm/slub.c:4325
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x9e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:322
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3959 [inline]
slab_alloc_node mm/slub.c:4019 [inline]
kmem_cache_alloc_lru_noprof+0x139/0x2b0 mm/slub.c:4038
sock_alloc_inode+0x28/0xc0 net/socket.c:308
alloc_inode fs/inode.c:261 [inline]
new_inode_pseudo+0x69/0x1e0 fs/inode.c:1007
sock_alloc net/socket.c:634 [inline]
__sock_create+0x123/0x920 net/socket.c:1535
sock_create net/socket.c:1622 [inline]
__sys_socket_create net/socket.c:1659 [inline]
__sys_socket+0x150/0x3c0 net/socket.c:1706
__do_sys_socket net/socket.c:1720 [inline]
__se_sys_socket net/socket.c:1718 [inline]
__x64_sys_socket+0x7a/0x90 net/socket.c:1718
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
Memory state around the buggy address:
ffff88805f0c7780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88805f0c7800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88805f0c7880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88805f0c7900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88805f0c7980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 44 24 60 rex.R and $0x60,%al
3: 42 80 3c 23 00 cmpb $0x0,(%rbx,%r12,1)
8: 74 08 je 0x12
a: 4c 89 ff mov %r15,%rdi
d: e8 79 fa f7 ff call 0xfff7fa8b
12: f6 44 24 61 02 testb $0x2,0x61(%rsp)
17: 0f 85 0c 01 00 00 jne 0x129
1d: 41 f7 c5 00 02 00 00 test $0x200,%r13d
24: 74 01 je 0x27
26: fb sti
27: 45 31 ed xor %r13d,%r13d
* 2a: 80 7c 24 0c 00 cmpb $0x0,0xc(%rsp) <-- trapping instruction
2f: 0f 85 88 00 00 00 jne 0xbd
35: 4c 89 f0 mov %r14,%rax
38: 48 c1 e8 0c shr $0xc,%rax
3c: 31 db xor %ebx,%ebx
3e: 41 rex.B
3f: 81 .byte 0x81