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: slab-use-after-free in debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline]
BUG: KASAN: slab-use-after-free in do_raw_spin_lock+0x271/0x2c0 kernel/locking/spinlock_debug.c:115
Read of size 4 at addr ffff88801ea9b85c by task kworker/u8:8/2816
CPU: 0 PID: 2816 Comm: kworker/u8:8 Not tainted 6.10.0-rc1-syzkaller-00267-gcc8ed4d0a848 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Workqueue: bat_events batadv_nc_worker
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline]
do_raw_spin_lock+0x271/0x2c0 kernel/locking/spinlock_debug.c:115
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
_raw_spin_lock_irqsave+0x42/0x60 kernel/locking/spinlock.c:162
__wake_up_common_lock kernel/sched/wait.c:105 [inline]
__wake_up+0x1c/0x60 kernel/sched/wait.c:127
__usb_unanchor_urb drivers/usb/core/urb.c:156 [inline]
usb_anchor_resume_wakeups+0xc2/0xe0 drivers/usb/core/urb.c:150
__usb_hcd_giveback_urb+0x392/0x5c0 drivers/usb/core/hcd.c:1651
usb_hcd_giveback_urb+0x396/0x450 drivers/usb/core/hcd.c:1732
dummy_timer+0x17f6/0x3900 drivers/usb/gadget/udc/dummy_hcd.c:1987
__run_hrtimer kernel/time/hrtimer.c:1687 [inline]
__hrtimer_run_queues+0x20c/0xcc0 kernel/time/hrtimer.c:1751
hrtimer_interrupt+0x31b/0x800 kernel/time/hrtimer.c:1813
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline]
__sysvec_apic_timer_interrupt+0x10f/0x450 arch/x86/kernel/apic/apic.c:1049
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0x43/0xb0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:kasan_quarantine_put+0x97/0x240 mm/kasan/quarantine.c:237
Code: 00 00 00 00 00 48 03 5a 10 48 81 fb 00 00 10 00 48 89 5a 10 0f 87 94 00 00 00 4d 85 ed 75 79 9c 58 f6 c4 02 0f 85 6d 01 00 00 <5b> b8 01 00 00 00 5d 41 5c 41 5d 41 5e c3 cc cc cc cc e8 62 6a ab
RSP: 0018:ffffc90000007390 EFLAGS: 00000246
RAX: 0000000000000002 RBX: 0000000000079448 RCX: 1ffffffff28570b7
RDX: 0000000000000000 RSI: ffffffff8b2cade0 RDI: ffffffff8b8ffec0
RBP: ffff88805ae46800 R08: 0000000000000001 R09: fffffbfff284d670
R10: ffffffff9426b387 R11: 0000000000000004 R12: ffff888015441dc0
R13: 0000000000000200 R14: ffff888015441dc0 R15: 0000000000000000
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2195 [inline]
slab_free mm/slub.c:4436 [inline]
kfree+0x12a/0x3b0 mm/slub.c:4557
ieee80211_inform_bss+0x76e/0x1140 net/mac80211/scan.c:160
rdev_inform_bss net/wireless/rdev-ops.h:418 [inline]
cfg80211_inform_single_bss_data+0x893/0x1f70 net/wireless/scan.c:2277
cfg80211_inform_bss_data+0x205/0x39d0 net/wireless/scan.c:3101
cfg80211_inform_bss_frame_data+0x271/0x7c0 net/wireless/scan.c:3191
ieee80211_bss_info_update+0x311/0xab0 net/mac80211/scan.c:226
ieee80211_scan_rx+0x47c/0xad0 net/mac80211/scan.c:340
__ieee80211_rx_handle_packet net/mac80211/rx.c:5222 [inline]
ieee80211_rx_list+0x1be1/0x2e90 net/mac80211/rx.c:5459
ieee80211_rx_napi+0xdd/0x400 net/mac80211/rx.c:5482
ieee80211_rx include/net/mac80211.h:5093 [inline]
ieee80211_tasklet_handler+0xd6/0x130 net/mac80211/main.c:438
tasklet_action_common.constprop.0+0x24c/0x3e0 kernel/softirq.c:785
handle_softirqs+0x216/0x8f0 kernel/softirq.c:554
do_softirq kernel/softirq.c:455 [inline]
do_softirq+0xb2/0xf0 kernel/softirq.c:442
__local_bh_enable_ip+0x100/0x120 kernel/softirq.c:382
spin_unlock_bh include/linux/spinlock.h:396 [inline]
batadv_nc_purge_paths+0x1d1/0x3c0 net/batman-adv/network-coding.c:471
batadv_nc_worker+0x97a/0x10f0 net/batman-adv/network-coding.c:720
process_one_work+0x9fb/0x1b60 kernel/workqueue.c:3231
process_scheduled_works kernel/workqueue.c:3312 [inline]
worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Allocated by task 5151:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:370 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387
kmalloc_noprof include/linux/slab.h:660 [inline]
kzalloc_noprof include/linux/slab.h:778 [inline]
xpad_probe+0x27e/0x1f50 drivers/input/joystick/xpad.c:2025
usb_probe_interface+0x309/0x9d0 drivers/usb/core/driver.c:399
call_driver_probe drivers/base/dd.c:578 [inline]
really_probe+0x23e/0xa90 drivers/base/dd.c:656
__driver_probe_device+0x1de/0x440 drivers/base/dd.c:798
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:828
__device_attach_driver+0x1df/0x310 drivers/base/dd.c:956
bus_for_each_drv+0x157/0x1e0 drivers/base/bus.c:457
__device_attach+0x1e8/0x4b0 drivers/base/dd.c:1028
bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532
device_add+0x114b/0x1a70 drivers/base/core.c:3721
usb_set_configuration+0x10cb/0x1c50 drivers/usb/core/message.c:2210
usb_generic_driver_probe+0xb1/0x110 drivers/usb/core/generic.c:254
usb_probe_device+0xec/0x3e0 drivers/usb/core/driver.c:294
call_driver_probe drivers/base/dd.c:578 [inline]
really_probe+0x23e/0xa90 drivers/base/dd.c:656
__driver_probe_device+0x1de/0x440 drivers/base/dd.c:798
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:828
__device_attach_driver+0x1df/0x310 drivers/base/dd.c:956
bus_for_each_drv+0x157/0x1e0 drivers/base/bus.c:457
__device_attach+0x1e8/0x4b0 drivers/base/dd.c:1028
bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:532
device_add+0x114b/0x1a70 drivers/base/core.c:3721
usb_new_device+0xd90/0x1a10 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+0x2db0/0x4e20 drivers/usb/core/hub.c:5903
process_one_work+0x9fb/0x1b60 kernel/workqueue.c:3231
process_scheduled_works kernel/workqueue.c:3312 [inline]
worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 783:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object+0xf7/0x160 mm/kasan/common.c:240
__kasan_slab_free+0x32/0x50 mm/kasan/common.c:256
kasan_slab_free include/linux/kasan.h:184 [inline]
slab_free_hook mm/slub.c:2195 [inline]
slab_free mm/slub.c:4436 [inline]
kfree+0x12a/0x3b0 mm/slub.c:4557
xpad_disconnect+0x1cf/0x580 drivers/input/joystick/xpad.c:2206
usb_unbind_interface+0x1e8/0x970 drivers/usb/core/driver.c:461
device_remove drivers/base/dd.c:568 [inline]
device_remove+0x122/0x170 drivers/base/dd.c:560
__device_release_driver drivers/base/dd.c:1270 [inline]
device_release_driver_internal+0x44a/0x610 drivers/base/dd.c:1293
bus_remove_device+0x22f/0x420 drivers/base/bus.c:574
device_del+0x396/0x9f0 drivers/base/core.c:3910
usb_disable_device+0x36c/0x7f0 drivers/usb/core/message.c:1418
usb_disconnect+0x2e1/0x920 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+0x1dbb/0x4e20 drivers/usb/core/hub.c:5903
process_one_work+0x9fb/0x1b60 kernel/workqueue.c:3231
process_scheduled_works kernel/workqueue.c:3312 [inline]
worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/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 ffff88801ea9b800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 92 bytes inside of
freed 1024-byte region [ffff88801ea9b800, ffff88801ea9bc00)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1ea98
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffefff(slab)
raw: 00fff00000000040 ffff888015441dc0 ffffea0000b54e00 dead000000000002
raw: 0000000000000000 0000000000100010 00000001ffffefff 0000000000000000
head: 00fff00000000040 ffff888015441dc0 ffffea0000b54e00 dead000000000002
head: 0000000000000000 0000000000100010 00000001ffffefff 0000000000000000
head: 00fff00000000003 ffffea00007aa601 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 5110, tgid 5110 (syz-executor.0), ts 83311757319, free_ts 83226114195
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1468
prep_new_page mm/page_alloc.c:1476 [inline]
get_page_from_freelist+0x136a/0x2df0 mm/page_alloc.c:3402
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4660
__alloc_pages_node_noprof include/linux/gfp.h:269 [inline]
alloc_pages_node_noprof include/linux/gfp.h:296 [inline]
alloc_slab_page+0x56/0x110 mm/slub.c:2264
allocate_slab mm/slub.c:2427 [inline]
new_slab+0x84/0x260 mm/slub.c:2480
___slab_alloc+0xdac/0x1870 mm/slub.c:3666
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3756
__slab_alloc_node mm/slub.c:3809 [inline]
slab_alloc_node mm/slub.c:3988 [inline]
__do_kmalloc_node mm/slub.c:4120 [inline]
__kmalloc_noprof+0x36d/0x410 mm/slub.c:4134
kmalloc_noprof include/linux/slab.h:664 [inline]
kzalloc_noprof include/linux/slab.h:778 [inline]
ieee802_11_parse_elems_full+0xea/0x15d0 net/mac80211/parse.c:880
ieee802_11_parse_elems_crc net/mac80211/ieee80211_i.h:2330 [inline]
ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2337 [inline]
ieee80211_inform_bss+0xfd/0x1140 net/mac80211/scan.c:79
rdev_inform_bss net/wireless/rdev-ops.h:418 [inline]
cfg80211_inform_single_bss_data+0x893/0x1f70 net/wireless/scan.c:2277
cfg80211_inform_bss_data+0x205/0x39d0 net/wireless/scan.c:3101
cfg80211_inform_bss_frame_data+0x271/0x7c0 net/wireless/scan.c:3191
ieee80211_bss_info_update+0x311/0xab0 net/mac80211/scan.c:226
ieee80211_scan_rx+0x47c/0xad0 net/mac80211/scan.c:340
__ieee80211_rx_handle_packet net/mac80211/rx.c:5222 [inline]
ieee80211_rx_list+0x1be1/0x2e90 net/mac80211/rx.c:5459
page last free pid 4518 tgid 4518 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1088 [inline]
free_unref_page+0x64a/0xe40 mm/page_alloc.c:2565
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x4e/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:322
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook mm/slub.c:3940 [inline]
slab_alloc_node mm/slub.c:4000 [inline]
__do_kmalloc_node mm/slub.c:4120 [inline]
__kmalloc_noprof+0x19d/0x410 mm/slub.c:4134
kmalloc_noprof include/linux/slab.h:664 [inline]
tomoyo_realpath_from_path+0xb9/0x720 security/tomoyo/realpath.c:251
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_perm+0x273/0x450 security/tomoyo/file.c:822
security_inode_getattr+0xf4/0x160 security/security.c:2269
vfs_getattr fs/stat.c:173 [inline]
vfs_fstat+0x53/0xd0 fs/stat.c:198
vfs_fstatat+0x134/0x150 fs/stat.c:300
__do_sys_newfstatat+0xa6/0x130 fs/stat.c:468
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88801ea9b700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88801ea9b780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88801ea9b800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88801ea9b880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88801ea9b900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 00 00 add %al,(%rax)
2: 00 00 add %al,(%rax)
4: 00 48 03 add %cl,0x3(%rax)
7: 5a pop %rdx
8: 10 48 81 adc %cl,-0x7f(%rax)
b: fb sti
c: 00 00 add %al,(%rax)
e: 10 00 adc %al,(%rax)
10: 48 89 5a 10 mov %rbx,0x10(%rdx)
14: 0f 87 94 00 00 00 ja 0xae
1a: 4d 85 ed test %r13,%r13
1d: 75 79 jne 0x98
1f: 9c pushf
20: 58 pop %rax
21: f6 c4 02 test $0x2,%ah
24: 0f 85 6d 01 00 00 jne 0x197
* 2a: 5b pop %rbx <-- trapping instruction
2b: b8 01 00 00 00 mov $0x1,%eax
30: 5d pop %rbp
31: 41 5c pop %r12
33: 41 5d pop %r13
35: 41 5e pop %r14
37: c3 ret
38: cc int3
39: cc int3
3a: cc int3
3b: cc int3
3c: e8 .byte 0xe8
3d: 62 .byte 0x62
3e: 6a ab push $0xffffffffffffffab