==================================================================
BUG: KASAN: slab-use-after-free in __update_min_deadline kernel/sched/fair.c:805 [inline]
BUG: KASAN: slab-use-after-free in min_deadline_update kernel/sched/fair.c:819 [inline]
BUG: KASAN: slab-use-after-free in min_deadline_cb_propagate kernel/sched/fair.c:825 [inline]
BUG: KASAN: slab-use-after-free in reweight_entity+0x477/0x8f0 kernel/sched/fair.c:3660
Read of size 8 at addr ffff888022d0bc30 by task syz-executor371/11398
CPU: 0 PID: 11398 Comm: syz-executor371 Not tainted 6.6.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0x163/0x540 mm/kasan/report.c:475
kasan_report+0x175/0x1b0 mm/kasan/report.c:588
__update_min_deadline kernel/sched/fair.c:805 [inline]
min_deadline_update kernel/sched/fair.c:819 [inline]
min_deadline_cb_propagate kernel/sched/fair.c:825 [inline]
reweight_entity+0x477/0x8f0 kernel/sched/fair.c:3660
update_cfs_group kernel/sched/fair.c:3826 [inline]
entity_tick kernel/sched/fair.c:5317 [inline]
task_tick_fair+0x341/0x8f0 kernel/sched/fair.c:12392
scheduler_tick+0x1f6/0x6d0 kernel/sched/core.c:5657
update_process_times+0x17f/0x1b0 kernel/time/timer.c:2076
tick_sched_handle kernel/time/tick-sched.c:254 [inline]
tick_sched_timer+0x379/0x550 kernel/time/tick-sched.c:1492
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x562/0xd10 kernel/time/hrtimer.c:1752
hrtimer_interrupt+0x396/0x980 kernel/time/hrtimer.c:1814
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1063 [inline]
__sysvec_apic_timer_interrupt+0x104/0x390 arch/x86/kernel/apic/apic.c:1080
sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:lock_acquire+0x25a/0x520 kernel/locking/lockdep.c:5757
Code: 2b 00 74 08 4c 89 f7 e8 24 96 7b 00 f6 44 24 61 02 0f 85 84 01 00 00 41 f7 c7 00 02 00 00 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 25 00 00 00 00 00 43 c7 44 25 09 00 00 00 00 43 c7 44 25
RSP: 0018:ffffc9000d717900 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff92001ae2f2c RCX: ffffffff816d0e35
RDX: 0000000000000000 RSI: ffffffff8b0ab580 RDI: ffffffff8b598120
RBP: ffffc9000d717a58 R08: dffffc0000000000 R09: 1ffffffff20dee84
R10: dffffc0000000000 R11: fffffbfff20dee85 R12: 1ffff92001ae2f28
R13: dffffc0000000000 R14: ffffc9000d717960 R15: 0000000000000246
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:351 [inline]
unix_release_sock+0x40c/0xd00 net/unix/af_unix.c:616
unix_release+0x8c/0xc0 net/unix/af_unix.c:1065
__sock_release net/socket.c:659 [inline]
sock_close+0xb8/0x230 net/socket.c:1419
__fput+0x3f8/0x910 fs/file_table.c:384
task_work_run+0x24a/0x300 kernel/task_work.c:180
exit_task_work include/linux/task_work.h:38 [inline]
do_exit+0xa2c/0x2650 kernel/exit.c:874
do_group_exit+0x206/0x2c0 kernel/exit.c:1024
__do_sys_exit_group kernel/exit.c:1035 [inline]
__se_sys_exit_group kernel/exit.c:1033 [inline]
__x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1033
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f118362b909
Code: Unable to access opcode bytes at 0x7f118362b8df.
RSP: 002b:00007ffc05524958 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007f118362b909
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000001
RBP: 00007f11836a8350 R08: ffffffffffffffb8 R09: 0000000000000000
R10: 00007ffc055249c8 R11: 0000000000000246 R12: 00007f11836a8350
R13: 0000000000000000 R14: 00007f11836a8dc0 R15: 00007f11835fc900
Allocated by task 2:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4f/0x70 mm/kasan/common.c:52
__kasan_slab_alloc+0x66/0x70 mm/kasan/common.c:328
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook+0x67/0x3d0 mm/slab.h:762
slab_alloc_node mm/slub.c:3478 [inline]
kmem_cache_alloc_node+0x148/0x330 mm/slub.c:3523
alloc_task_struct_node kernel/fork.c:173 [inline]
dup_task_struct+0x57/0x7d0 kernel/fork.c:1110
copy_process+0x5d1/0x41a0 kernel/fork.c:2327
kernel_clone+0x222/0x840 kernel/fork.c:2909
kernel_thread+0x1bc/0x230 kernel/fork.c:2971
create_kthread kernel/kthread.c:411 [inline]
kthreadd+0x60c/0x810 kernel/kthread.c:746
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
Freed by task 0:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4f/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x28/0x40 mm/kasan/generic.c:522
____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1800 [inline]
slab_free_freelist_hook mm/slub.c:1826 [inline]
slab_free mm/slub.c:3809 [inline]
kmem_cache_free+0x292/0x500 mm/slub.c:3831
put_task_struct include/linux/sched/task.h:136 [inline]
delayed_put_task_struct+0x115/0x2c0 kernel/exit.c:226
rcu_do_batch kernel/rcu/tree.c:2139 [inline]
rcu_core+0xacf/0x1790 kernel/rcu/tree.c:2403
__do_softirq+0x2ab/0x908 kernel/softirq.c:553
Last potentially related work creation:
kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xad/0xc0 mm/kasan/generic.c:492
__call_rcu_common kernel/rcu/tree.c:2653 [inline]
call_rcu+0x167/0xa70 kernel/rcu/tree.c:2767
context_switch kernel/sched/core.c:5385 [inline]
__schedule+0x1974/0x4af0 kernel/sched/core.c:6695
schedule_idle+0x52/0x90 kernel/sched/core.c:6799
do_idle+0x565/0x5c0 kernel/sched/idle.c:310
cpu_startup_entry+0x41/0x60 kernel/sched/idle.c:380
start_secondary+0xee/0xf0 arch/x86/kernel/smpboot.c:326
secondary_startup_64_no_verify+0x167/0x16b
Second to last potentially related work creation:
kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xad/0xc0 mm/kasan/generic.c:492
__call_rcu_common kernel/rcu/tree.c:2653 [inline]
call_rcu+0x167/0xa70 kernel/rcu/tree.c:2767
context_switch kernel/sched/core.c:5385 [inline]
__schedule+0x1974/0x4af0 kernel/sched/core.c:6695
schedule+0xc3/0x180 kernel/sched/core.c:6771
schedule_timeout+0xb0/0x300 kernel/time/timer.c:2143
do_wait_for_common kernel/sched/completion.c:95 [inline]
__wait_for_common kernel/sched/completion.c:116 [inline]
wait_for_common kernel/sched/completion.c:127 [inline]
wait_for_completion+0x354/0x620 kernel/sched/completion.c:148
kthread_stop+0x18e/0x5d0 kernel/kthread.c:709
vhci_shutdown_connection+0x1ad/0x610 drivers/usb/usbip/vhci_hcd.c:1027
event_handler+0x24e/0x4b0 drivers/usb/usbip/usbip_event.c:79
process_one_work kernel/workqueue.c:2630 [inline]
process_scheduled_works+0x90f/0x1400 kernel/workqueue.c:2703
worker_thread+0xa5f/0xff0 kernel/workqueue.c:2784
kthread+0x2d3/0x370 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
The buggy address belongs to the object at ffff888022d0bb80
which belongs to the cache task_struct of size 7360
The buggy address is located 176 bytes inside of
freed 7360-byte region [ffff888022d0bb80, ffff888022d0d840)
The buggy address belongs to the physical page:
page:ffffea00008b4200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x22d08
head:ffffea00008b4200 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888025984dc1
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014a43500 0000000000000000 dead000000000001
raw: 0000000000000000 0000000080040004 00000001ffffffff ffff888025984dc1
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 2, tgid 2 (kthreadd), ts 163031390458, free_ts 162869363826
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536
prep_new_page mm/page_alloc.c:1543 [inline]
get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170
__alloc_pages+0x255/0x670 mm/page_alloc.c:4426
alloc_slab_page+0x6a/0x160 mm/slub.c:1870
allocate_slab mm/slub.c:2017 [inline]
new_slab+0x84/0x2f0 mm/slub.c:2070
___slab_alloc+0xc85/0x1310 mm/slub.c:3223
__slab_alloc mm/slub.c:3322 [inline]
__slab_alloc_node mm/slub.c:3375 [inline]
slab_alloc_node mm/slub.c:3468 [inline]
kmem_cache_alloc_node+0x1e1/0x330 mm/slub.c:3523
alloc_task_struct_node kernel/fork.c:173 [inline]
dup_task_struct+0x57/0x7d0 kernel/fork.c:1110
copy_process+0x5d1/0x41a0 kernel/fork.c:2327
kernel_clone+0x222/0x840 kernel/fork.c:2909
kernel_thread+0x1bc/0x230 kernel/fork.c:2971
create_kthread kernel/kthread.c:411 [inline]
kthreadd+0x60c/0x810 kernel/kthread.c:746
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1136 [inline]
free_unref_page_prepare+0x8c3/0x9f0 mm/page_alloc.c:2312
free_unref_page+0x37/0x3f0 mm/page_alloc.c:2405
discard_slab mm/slub.c:2116 [inline]
__unfreeze_partials+0x1dc/0x220 mm/slub.c:2655
put_cpu_partial+0x17b/0x250 mm/slub.c:2731
__slab_free+0x2b6/0x390 mm/slub.c:3679
qlink_free mm/kasan/quarantine.c:166 [inline]
qlist_free_all+0x75/0xe0 mm/kasan/quarantine.c:185
kasan_quarantine_reduce+0x14b/0x160 mm/kasan/quarantine.c:292
__kasan_slab_alloc+0x23/0x70 mm/kasan/common.c:305
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook+0x67/0x3d0 mm/slab.h:762
slab_alloc_node mm/slub.c:3478 [inline]
kmem_cache_alloc_node+0x148/0x330 mm/slub.c:3523
__alloc_skb+0x181/0x420 net/core/skbuff.c:640
alloc_skb include/linux/skbuff.h:1286 [inline]
alloc_skb_with_frags+0xc3/0x780 net/core/skbuff.c:6313
sock_alloc_send_pskb+0x919/0xa50 net/core/sock.c:2795
unix_dgram_sendmsg+0x659/0x2070 net/unix/af_unix.c:1953
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg net/socket.c:745 [inline]
__sys_sendto+0x484/0x640 net/socket.c:2194
__do_sys_sendto net/socket.c:2206 [inline]
__se_sys_sendto net/socket.c:2202 [inline]
__x64_sys_sendto+0xde/0xf0 net/socket.c:2202
Memory state around the buggy address:
ffff888022d0bb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888022d0bb80: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888022d0bc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888022d0bc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888022d0bd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 2b 00 sub (%rax),%eax
2: 74 08 je 0xc
4: 4c 89 f7 mov %r14,%rdi
7: e8 24 96 7b 00 call 0x7b9630
c: f6 44 24 61 02 testb $0x2,0x61(%rsp)
11: 0f 85 84 01 00 00 jne 0x19b
17: 41 f7 c7 00 02 00 00 test $0x200,%r15d
1e: 74 01 je 0x21
20: fb sti
21: 48 c7 44 24 40 0e 36 movq $0x45e0360e,0x40(%rsp)
28: e0 45
* 2a: 4b c7 44 25 00 00 00 movq $0x0,0x0(%r13,%r12,1) <-- trapping instruction
31: 00 00
33: 43 c7 44 25 09 00 00 movl $0x0,0x9(%r13,%r12,1)
3a: 00 00
3c: 43 rex.XB
3d: c7 .byte 0xc7
3e: 44 rex.R
3f: 25 .byte 0x25