==================================================================
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+0x8e3/0xa60 kernel/sched/fair.c:3660
Read of size 8 at addr ffff88807a9359f0 by task syz-executor.4/4740
CPU: 1 PID: 4740 Comm: syz-executor.4 Not tainted 6.6.0-rc6-syzkaller-00285-g9c5d00cb7b6b #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+0xd9/0x1b0 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xc4/0x620 mm/kasan/report.c:475
kasan_report+0xda/0x110 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+0x8e3/0xa60 kernel/sched/fair.c:3660
enqueue_task_fair+0x2e6/0xbc0 kernel/sched/fair.c:6556
enqueue_task kernel/sched/core.c:2102 [inline]
activate_task kernel/sched/core.c:2132 [inline]
ttwu_do_activate+0x214/0xd90 kernel/sched/core.c:3787
ttwu_queue kernel/sched/core.c:4029 [inline]
try_to_wake_up+0x8e7/0x15b0 kernel/sched/core.c:4346
hrtimer_wakeup+0x47/0x60 kernel/time/hrtimer.c:1942
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x203/0xc10 kernel/time/hrtimer.c:1752
hrtimer_interrupt+0x31b/0x800 kernel/time/hrtimer.c:1814
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1063 [inline]
__sysvec_apic_timer_interrupt+0x105/0x3f0 arch/x86/kernel/apic/apic.c:1080
sysvec_apic_timer_interrupt+0x42/0xc0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:write_comp_data+0x15/0x90 kernel/kcov.c:230
Code: bc 03 00 48 8b 80 f8 15 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 65 8b 05 b1 f8 7b 7e 49 89 f1 89 c6 49 89 d2 81 e6 00 01 00 00 <49> 89 f8 65 48 8b 14 25 c0 bc 03 00 a9 00 01 ff 00 74 0e 85 f6 74
RSP: 0018:ffffc900001f08b8 EFLAGS: 00000206
RAX: 0000000080000101 RBX: ffffffff8ee44190 RCX: ffffffff813a3be4
RDX: ffffffff81dd2988 RSI: 0000000000000100 RDI: 0000000000000006
RBP: ffffffff8ee44190 R08: 0000000000000006 R09: ffffffff81dd2a6f
R10: ffffffff81dd2988 R11: 0000000000000000 R12: ffffffff81dd2a6f
R13: ffffffff81dd2988 R14: dffffc0000000000 R15: ffffffff8ee44190
__orc_find+0xc4/0x130 arch/x86/kernel/unwind_orc.c:102
orc_find arch/x86/kernel/unwind_orc.c:227 [inline]
unwind_next_frame+0x329/0x2390 arch/x86/kernel/unwind_orc.c:494
arch_stack_walk+0xfa/0x170 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x96/0xd0 kernel/stacktrace.c:122
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522
____kasan_slab_free mm/kasan/common.c:236 [inline]
____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1800 [inline]
slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826
slab_free mm/slub.c:3809 [inline]
kmem_cache_free+0xf0/0x480 mm/slub.c:3831
vma_lock_free kernel/fork.c:471 [inline]
__vm_area_free+0xee/0x140 kernel/fork.c:527
rcu_do_batch kernel/rcu/tree.c:2139 [inline]
rcu_core+0x805/0x1bb0 kernel/rcu/tree.c:2403
__do_softirq+0x218/0x965 kernel/softirq.c:553
invoke_softirq kernel/softirq.c:427 [inline]
__irq_exit_rcu kernel/softirq.c:632 [inline]
irq_exit_rcu+0xb7/0x120 kernel/softirq.c:644
sysvec_apic_timer_interrupt+0x93/0xc0 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+0x1ef/0x510 kernel/locking/lockdep.c:5721
Code: c1 05 25 f3 99 7e 83 f8 01 0f 85 b0 02 00 00 9c 58 f6 c4 02 0f 85 9b 02 00 00 48 85 ed 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 48 c7 43 08 00 00 00 00 48 8b 84 24
RSP: 0018:ffffc90009f07230 EFLAGS: 00000206
RAX: dffffc0000000000 RBX: 1ffff920013e0e48 RCX: 0000000000000001
RDX: 1ffff1100f941c80 RSI: ffffffff8a8caf20 RDI: ffffffff8ae92de0
RBP: 0000000000000200 R08: 0000000000000000 R09: fffffbfff2339bd0
R10: ffffffff919cde87 R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000000 R14: ffffffff8cbab2e0 R15: 0000000000000000
rcu_lock_acquire include/linux/rcupdate.h:303 [inline]
rcu_read_lock include/linux/rcupdate.h:749 [inline]
page_ext_get+0x3a/0x310 mm/page_ext.c:508
__reset_page_owner+0x2f/0x190 mm/page_owner.c:145
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1136 [inline]
free_unref_page_prepare+0x476/0xa40 mm/page_alloc.c:2312
free_unref_page_list+0xe6/0xb30 mm/page_alloc.c:2451
release_pages+0x32a/0x14e0 mm/swap.c:1042
__folio_batch_release+0x77/0xe0 mm/swap.c:1062
folio_batch_release include/linux/pagevec.h:83 [inline]
shmem_undo_range+0x582/0x1040 mm/shmem.c:1022
shmem_truncate_range mm/shmem.c:1114 [inline]
shmem_evict_inode+0x392/0xb50 mm/shmem.c:1243
evict+0x2ed/0x6b0 fs/inode.c:664
iput_final fs/inode.c:1775 [inline]
iput.part.0+0x55e/0x7a0 fs/inode.c:1801
iput+0x5c/0x80 fs/inode.c:1791
dentry_unlink_inode+0x292/0x430 fs/dcache.c:401
__dentry_kill+0x3b8/0x640 fs/dcache.c:607
dentry_kill fs/dcache.c:733 [inline]
dput+0x8b7/0xf80 fs/dcache.c:913
__fput+0x536/0xa70 fs/file_table.c:392
task_work_run+0x14d/0x240 kernel/task_work.c:180
exit_task_work include/linux/task_work.h:38 [inline]
do_exit+0xa92/0x2a20 kernel/exit.c:874
do_group_exit+0xd4/0x2a0 kernel/exit.c:1024
get_signal+0x23ba/0x2790 kernel/signal.c:2892
arch_do_signal_or_restart+0x90/0x7f0 arch/x86/kernel/signal.c:309
exit_to_user_mode_loop kernel/entry/common.c:168 [inline]
exit_to_user_mode_prepare+0x11f/0x240 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:296
__do_fast_syscall_32+0x6d/0xe0 arch/x86/entry/common.c:181
do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203
entry_SYSENTER_compat_after_hwframe+0x70/0x82
RIP: 0023:0xf7fdb579
Code: Unable to access opcode bytes at 0xf7fdb54f.
RSP: 002b:00000000f7fd65ac EFLAGS: 00000292 ORIG_RAX: 0000000000000171
RAX: 0000000000ffc000 RBX: 0000000000000003 RCX: 00000000200001c0
RDX: 00000000fffffede RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000003000137 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000292 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Allocated by task 4710:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
__kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:328
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook mm/slab.h:762 [inline]
slab_alloc_node mm/slub.c:3478 [inline]
kmem_cache_alloc_node+0x180/0x3f0 mm/slub.c:3523
alloc_task_struct_node kernel/fork.c:173 [inline]
dup_task_struct kernel/fork.c:1110 [inline]
copy_process+0x41c/0x73f0 kernel/fork.c:2327
kernel_clone+0xfd/0x920 kernel/fork.c:2909
__do_sys_clone+0xba/0x100 kernel/fork.c:3052
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Freed by task 2422:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522
____kasan_slab_free mm/kasan/common.c:236 [inline]
____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1800 [inline]
slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826
slab_free mm/slub.c:3809 [inline]
kmem_cache_free+0xf0/0x480 mm/slub.c:3831
put_task_struct include/linux/sched/task.h:136 [inline]
put_task_struct include/linux/sched/task.h:123 [inline]
delayed_put_task_struct+0x21b/0x2b0 kernel/exit.c:226
rcu_do_batch kernel/rcu/tree.c:2139 [inline]
rcu_core+0x805/0x1bb0 kernel/rcu/tree.c:2403
__do_softirq+0x218/0x965 kernel/softirq.c:553
Last potentially related work creation:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
__kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492
__call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:2653
put_task_struct_rcu_user kernel/exit.c:232 [inline]
put_task_struct_rcu_user+0x87/0xc0 kernel/exit.c:229
context_switch kernel/sched/core.c:5385 [inline]
__schedule+0xee9/0x5a10 kernel/sched/core.c:6695
schedule_idle+0x5b/0x80 kernel/sched/core.c:6799
do_idle+0x288/0x3f0 kernel/sched/idle.c:310
cpu_startup_entry+0x50/0x60 kernel/sched/idle.c:380
rest_init+0x16f/0x2b0 init/main.c:726
arch_call_rest_init+0x13/0x30 init/main.c:823
start_kernel+0x39f/0x480 init/main.c:1068
x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:556
x86_64_start_kernel+0xb2/0xc0 arch/x86/kernel/head64.c:537
secondary_startup_64_no_verify+0x166/0x16b
Second to last potentially related work creation:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
__kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492
__call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:2653
put_task_struct_rcu_user kernel/exit.c:232 [inline]
put_task_struct_rcu_user+0x87/0xc0 kernel/exit.c:229
context_switch kernel/sched/core.c:5385 [inline]
__schedule+0xee9/0x5a10 kernel/sched/core.c:6695
preempt_schedule_common+0x45/0xc0 kernel/sched/core.c:6864
preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk_64.S:45
__raw_spin_unlock include/linux/spinlock_api_smp.h:143 [inline]
_raw_spin_unlock+0x3a/0x40 kernel/locking/spinlock.c:186
spin_unlock include/linux/spinlock.h:391 [inline]
close_fd_get_file+0x62/0x80 fs/file.c:815
__do_sys_close fs/open.c:1562 [inline]
__se_sys_close fs/open.c:1557 [inline]
__ia32_sys_close+0x35/0xf0 fs/open.c:1557
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
__do_fast_syscall_32+0x61/0xe0 arch/x86/entry/common.c:178
do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203
entry_SYSENTER_compat_after_hwframe+0x70/0x82
The buggy address belongs to the object at ffff88807a935940
which belongs to the cache task_struct of size 7360
The buggy address is located 176 bytes inside of
freed 7360-byte region [ffff88807a935940, ffff88807a937600)
The buggy address belongs to the physical page:
page:ffffea0001ea4c00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7a930
head:ffffea0001ea4c00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888084b0a141
flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014e43500 dead000000000100 dead000000000122
raw: 0000000000000000 0000000080040004 00000001ffffffff ffff888084b0a141
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 4045, tgid 4045 (syz-executor.3), ts 975631157104, free_ts 975290343266
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1536
prep_new_page mm/page_alloc.c:1543 [inline]
get_page_from_freelist+0xee0/0x2f20 mm/page_alloc.c:3170
__alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4426
alloc_pages+0x1a9/0x270 mm/mempolicy.c:2297
alloc_slab_page mm/slub.c:1870 [inline]
allocate_slab+0x251/0x380 mm/slub.c:2017
new_slab mm/slub.c:2070 [inline]
___slab_alloc+0x8c7/0x1580 mm/slub.c:3223
__slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322
__slab_alloc_node mm/slub.c:3375 [inline]
slab_alloc_node mm/slub.c:3468 [inline]
kmem_cache_alloc_node+0x132/0x3f0 mm/slub.c:3523
alloc_task_struct_node kernel/fork.c:173 [inline]
dup_task_struct kernel/fork.c:1110 [inline]
copy_process+0x41c/0x73f0 kernel/fork.c:2327
kernel_clone+0xfd/0x920 kernel/fork.c:2909
__do_sys_clone3+0x1f1/0x260 kernel/fork.c:3210
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
do_int80_syscall_32+0x49/0x90 arch/x86/entry/common.c:132
entry_INT80_compat+0x8f/0xa0 arch/x86/entry/entry_64_compat.S:353
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+0x476/0xa40 mm/page_alloc.c:2312
free_unref_page+0x33/0x3b0 mm/page_alloc.c:2405
__unfreeze_partials+0x21d/0x240 mm/slub.c:2655
qlink_free mm/kasan/quarantine.c:166 [inline]
qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:185
kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:292
__kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook mm/slab.h:762 [inline]
slab_alloc_node mm/slub.c:3478 [inline]
slab_alloc mm/slub.c:3486 [inline]
__kmem_cache_alloc_lru mm/slub.c:3493 [inline]
kmem_cache_alloc+0x16c/0x3b0 mm/slub.c:3502
kmem_cache_zalloc include/linux/slab.h:710 [inline]
taskstats_tgid_alloc kernel/taskstats.c:583 [inline]
taskstats_exit+0x611/0xba0 kernel/taskstats.c:622
do_exit+0x832/0x2a20 kernel/exit.c:859
do_group_exit+0xd4/0x2a0 kernel/exit.c:1024
__do_sys_exit_group kernel/exit.c:1035 [inline]
__se_sys_exit_group kernel/exit.c:1033 [inline]
__ia32_sys_exit_group+0x3e/0x50 kernel/exit.c:1033
do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
__do_fast_syscall_32+0x61/0xe0 arch/x86/entry/common.c:178
do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203
entry_SYSENTER_compat_after_hwframe+0x70/0x82
Memory state around the buggy address:
ffff88807a935880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807a935900: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
>ffff88807a935980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807a935a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807a935a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: bc 03 00 48 8b mov $0x8b480003,%esp
5: 80 f8 15 cmp $0x15,%al
8: 00 00 add %al,(%rax)
a: c3 ret
b: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1)
12: 00 00 00
15: 65 8b 05 b1 f8 7b 7e mov %gs:0x7e7bf8b1(%rip),%eax # 0x7e7bf8cd
1c: 49 89 f1 mov %rsi,%r9
1f: 89 c6 mov %eax,%esi
21: 49 89 d2 mov %rdx,%r10
24: 81 e6 00 01 00 00 and $0x100,%esi
* 2a: 49 89 f8 mov %rdi,%r8 <-- trapping instruction
2d: 65 48 8b 14 25 c0 bc mov %gs:0x3bcc0,%rdx
34: 03 00
36: a9 00 01 ff 00 test $0xff0100,%eax
3b: 74 0e je 0x4b
3d: 85 f6 test %esi,%esi
3f: 74 .byte 0x74