xpad 4-1:179.65: xpad_irq_in - usb_submit_urb failed with result -19
xpad 4-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+0x299/0x370 kernel/locking/spinlock_debug.c:115
Read of size 4 at addr ffff88805b49b85c by task syz-executor.0/8770
CPU: 0 PID: 8770 Comm: syz-executor.0 Not tainted 6.9.0-rc7-syzkaller-00023-g6d7ddd805123 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
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
debug_spin_lock_before kernel/locking/spinlock_debug.c:86 [inline]
do_raw_spin_lock+0x299/0x370 kernel/locking/spinlock_debug.c:115
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
_raw_spin_lock_irqsave+0xe1/0x120 kernel/locking/spinlock.c:162
__wake_up_common_lock+0x25/0x1e0 kernel/sched/wait.c:105
__usb_hcd_giveback_urb+0x3ac/0x530 drivers/usb/core/hcd.c:1651
dummy_timer+0x833/0x45f0 drivers/usb/gadget/udc/dummy_hcd.c:1987
call_timer_fn+0x190/0x650 kernel/time/timer.c:1793
expire_timers kernel/time/timer.c:1844 [inline]
__run_timers kernel/time/timer.c:2418 [inline]
__run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2429
run_timer_base kernel/time/timer.c:2438 [inline]
run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2448
handle_softirqs+0x2d8/0x990 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637
irq_exit_rcu+0x9/0x30 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:page_ext_get+0x283/0x2a0 mm/page_ext.c:516
Code: d8 d7 8b e8 6f 32 6c ff e8 ca 7f 76 ff 48 c7 c7 a0 4d 33 8e 4c 89 f6 e8 8b f7 6b ff 45 31 ff 4c 89 f8 5b 41 5c 41 5e 41 5f 5d 83 8d a9 09 e8 f3 54 8f ff e9 dc fe ff ff e8 e9 54 8f ff 90 0f
RSP: 0018:ffffc9001446f2a8 EFLAGS: 00000293
RAX: ffff8880168ec450 RBX: 0000000000abd040 RCX: ffff88805d28da00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffea0000000000 R08: ffffffff8206b2ba R09: 1ffffffff25e6aa0
R10: dffffc0000000000 R11: fffffbfff25e6aa1 R12: 0000000000000000
R13: 0000000000000001 R14: 800000002af41007 R15: dffffc0000000000
page_table_check_set+0x5d/0x700 mm/page_table_check.c:109
__page_table_check_ptes_set+0x220/0x280 mm/page_table_check.c:196
page_table_check_ptes_set include/linux/page_table_check.h:74 [inline]
set_ptes include/linux/pgtable.h:267 [inline]
__copy_present_ptes mm/memory.c:953 [inline]
copy_present_ptes mm/memory.c:1036 [inline]
copy_pte_range mm/memory.c:1151 [inline]
copy_pmd_range mm/memory.c:1238 [inline]
copy_pud_range mm/memory.c:1275 [inline]
copy_p4d_range mm/memory.c:1299 [inline]
copy_page_range+0x3d98/0x5b00 mm/memory.c:1397
dup_mmap kernel/fork.c:751 [inline]
dup_mm kernel/fork.c:1688 [inline]
copy_mm+0x1321/0x2180 kernel/fork.c:1737
copy_process+0x187a/0x3df0 kernel/fork.c:2390
kernel_clone+0x226/0x8f0 kernel/fork.c:2797
__do_sys_clone kernel/fork.c:2940 [inline]
__se_sys_clone kernel/fork.c:2924 [inline]
__x64_sys_clone+0x258/0x2a0 kernel/fork.c:2924
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff02207ad93
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:00007ffd6ebaac08 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007ff02207ad93
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
R10: 000055555dc96750 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000001
Allocated by task 5261:
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_trace+0x1db/0x370 mm/slub.c:4003
kmalloc include/linux/slab.h:628 [inline]
kzalloc include/linux/slab.h:749 [inline]
xpad_probe+0x3c8/0x1b90 drivers/input/joystick/xpad.c:2023
usb_probe_interface+0x647/0xbb0 drivers/usb/core/driver.c:399
really_probe+0x2ba/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+0x250/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+0x8ff/0xca0 drivers/base/core.c:3720
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+0x1ba/0x380 drivers/usb/core/driver.c:294
really_probe+0x2ba/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+0x250/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+0x8ff/0xca0 drivers/base/core.c:3720
usb_new_device+0x104a/0x19a0 drivers/usb/core/hub.c:2652
hub_port_connect drivers/usb/core/hub.c:5522 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5662 [inline]
port_event drivers/usb/core/hub.c:5822 [inline]
hub_event+0x2d6a/0x5150 drivers/usb/core/hub.c:5904
process_one_work kernel/workqueue.c:3267 [inline]
process_scheduled_works+0xa12/0x17c0 kernel/workqueue.c:3348
worker_thread+0x86d/0xd70 kernel/workqueue.c:3429
kthread+0x2f2/0x390 kernel/kthread.c:388
ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 24:
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+0xa6/0xe0 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:2111 [inline]
slab_free mm/slub.c:4286 [inline]
kfree+0x153/0x3b0 mm/slub.c:4396
xpad_disconnect+0x359/0x490 drivers/input/joystick/xpad.c:2204
usb_unbind_interface+0x260/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+0x505/0x7c0 drivers/base/dd.c:1293
bus_remove_device+0x34f/0x420 drivers/base/bus.c:574
device_del+0x57a/0x9e0 drivers/base/core.c:3909
usb_disable_device+0x3bf/0x850 drivers/usb/core/message.c:1418
usb_disconnect+0x340/0x950 drivers/usb/core/hub.c:2305
hub_port_connect drivers/usb/core/hub.c:5362 [inline]
hub_port_connect_change drivers/usb/core/hub.c:5662 [inline]
port_event drivers/usb/core/hub.c:5822 [inline]
hub_event+0x1eb9/0x5150 drivers/usb/core/hub.c:5904
process_one_work kernel/workqueue.c:3267 [inline]
process_scheduled_works+0xa12/0x17c0 kernel/workqueue.c:3348
worker_thread+0x86d/0xd70 kernel/workqueue.c:3429
kthread+0x2f2/0x390 kernel/kthread.c:388
ret_from_fork+0x4d/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 ffff88805b49b800
which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 92 bytes inside of
freed 1024-byte region [ffff88805b49b800, ffff88805b49bc00)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5b498
head: order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888015041dc0 ffffea000122cc00 dead000000000002
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
head: 00fff00000000840 ffff888015041dc0 ffffea000122cc00 dead000000000002
head: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
head: 00fff00000000003 ffffea00016d2601 dead000000000122 00000000ffffffff
head: 0000000800000000 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 50, tgid 1335479918 (kworker/u8:3), ts 50, free_ts 82925307555
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1534
prep_new_page mm/page_alloc.c:1541 [inline]
get_page_from_freelist+0x3410/0x35b0 mm/page_alloc.c:3317
__alloc_pages+0x256/0x6c0 mm/page_alloc.c:4575
__alloc_pages_node include/linux/gfp.h:238 [inline]
alloc_pages_node include/linux/gfp.h:261 [inline]
alloc_slab_page+0x5f/0x160 mm/slub.c:2180
allocate_slab mm/slub.c:2343 [inline]
new_slab+0x84/0x2f0 mm/slub.c:2396
___slab_alloc+0xc73/0x1260 mm/slub.c:3530
__slab_alloc mm/slub.c:3615 [inline]
__slab_alloc_node mm/slub.c:3668 [inline]
slab_alloc_node mm/slub.c:3841 [inline]
__do_kmalloc_node mm/slub.c:3971 [inline]
__kmalloc+0x2e5/0x4a0 mm/slub.c:3985
kmalloc include/linux/slab.h:632 [inline]
kzalloc include/linux/slab.h:749 [inline]
neigh_alloc net/core/neighbour.c:494 [inline]
___neigh_create+0x691/0x2470 net/core/neighbour.c:648
ip6_finish_output2+0x1629/0x1670 net/ipv6/ip6_output.c:128
ip6_finish_output+0x41e/0x810 net/ipv6/ip6_output.c:222
NF_HOOK include/linux/netfilter.h:314 [inline]
ndisc_send_skb+0xab0/0x1380 net/ipv6/ndisc.c:509
ndisc_send_ns+0xcc/0x160 net/ipv6/ndisc.c:667
addrconf_dad_work+0xb45/0x16f0 net/ipv6/addrconf.c:4280
process_one_work kernel/workqueue.c:3267 [inline]
process_scheduled_works+0xa12/0x17c0 kernel/workqueue.c:3348
worker_thread+0x86d/0xd70 kernel/workqueue.c:3429
kthread+0x2f2/0x390 kernel/kthread.c:388
page last free pid 5108 tgid 5108 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1141 [inline]
free_unref_page_prepare+0x986/0xab0 mm/page_alloc.c:2347
free_unref_page+0x37/0x3f0 mm/page_alloc.c:2487
discard_slab mm/slub.c:2442 [inline]
__put_partials+0xeb/0x130 mm/slub.c:2911
put_cpu_partial+0x17c/0x250 mm/slub.c:2986
__slab_free+0x2ea/0x3d0 mm/slub.c:4157
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x5e/0xc0 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:3804 [inline]
slab_alloc_node mm/slub.c:3851 [inline]
kmalloc_trace+0x16f/0x370 mm/slub.c:3998
kmalloc include/linux/slab.h:628 [inline]
call_modprobe kernel/module/kmod.c:84 [inline]
__request_module+0x2b9/0x650 kernel/module/kmod.c:173
dev_ioctl+0x52e/0x1340 net/core/dev_ioctl.c:713
sock_do_ioctl+0x240/0x460 net/socket.c:1236
sock_ioctl+0x629/0x8e0 net/socket.c:1341
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:904 [inline]
__se_sys_ioctl+0xfe/0x170 fs/ioctl.c:890
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88805b49b700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88805b49b780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88805b49b800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88805b49b880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88805b49b900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess), 3 bytes skipped:
0: e8 6f 32 6c ff call 0xff6c3274
5: e8 ca 7f 76 ff call 0xff767fd4
a: 48 c7 c7 a0 4d 33 8e mov $0xffffffff8e334da0,%rdi
11: 4c 89 f6 mov %r14,%rsi
14: e8 8b f7 6b ff call 0xff6bf7a4
19: 45 31 ff xor %r15d,%r15d
1c: 4c 89 f8 mov %r15,%rax
1f: 5b pop %rbx
20: 41 5c pop %r12
22: 41 5e pop %r14
24: 41 5f pop %r15
26: 5d pop %rbp
* 27: e9 83 8d a9 09 jmp 0x9a98daf <-- trapping instruction
2c: e8 f3 54 8f ff call 0xff8f5524
31: e9 dc fe ff ff jmp 0xffffff12
36: e8 e9 54 8f ff call 0xff8f5524
3b: 90 nop
3c: 0f .byte 0xf