==================================================================
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 ffff888115fd1db0 by task syz-executor.0/23784
CPU: 1 PID: 23784 Comm: syz-executor.0 Not tainted 6.6.0-rc6-syzkaller-00158-g9b6db9a3a675 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/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+0xd81/0x1b40 kernel/sched/fair.c:6556
enqueue_task kernel/sched/core.c:2102 [inline]
activate_task+0xe9/0x250 kernel/sched/core.c:2132
ttwu_do_activate+0x10d/0x6e0 kernel/sched/core.c:3787
ttwu_queue kernel/sched/core.c:4029 [inline]
try_to_wake_up+0x8ab/0x1230 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+0x89/0xb0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:__sanitizer_cov_trace_const_cmp4+0x8/0x20 kernel/kcov.c:304
Code: 00 00 f3 0f 1e fa 48 8b 0c 24 0f b7 d6 0f b7 f7 bf 03 00 00 00 e9 b8 fe ff ff 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 48 8b 0c 24 <89> f2 89 fe bf 05 00 00 00 e9 9a fe ff ff 66 2e 0f 1f 84 00 00 00
RSP: 0018:ffffc90004f179d8 EFLAGS: 00000246
RAX: 0000000000040000 RBX: 0000000000000214 RCX: ffffffff81896a1b
RDX: 0000000000040000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff8881129a9cb0 R08: 0000000000000000 R09: fffffbfff12665ba
R10: ffffffff89332dd7 R11: 0000000000000000 R12: ffff8881129a9cd0
R13: 0000000000000000 R14: ffff8881129a9cc0 R15: 0000000000000000
handle_mm_fault+0x37b/0x890 mm/memory.c:5288
do_user_addr_fault+0x3d1/0x1000 arch/x86/mm/fault.c:1413
handle_page_fault arch/x86/mm/fault.c:1505 [inline]
exc_page_fault+0x5c/0xd0 arch/x86/mm/fault.c:1561
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:570
RIP: 0010:fault_in_readable+0x106/0x200 mm/gup.c:1984
Code: ff 0f 00 00 31 c0 4c 89 eb 48 81 e5 00 f0 ff ff 4c 39 ed 48 0f 42 e8 e8 48 ad c6 ff 48 39 dd 0f 84 e0 00 00 00 e8 3a ad c6 ff <44> 8a 3b e8 32 ad c6 ff 48 81 c3 00 10 00 00 48 39 eb 44 88 7c 24
RSP: 0018:ffffc90004f17b60 EFLAGS: 00050246
RAX: 0000000000040000 RBX: 0000000020443000 RCX: ffffc9000fcca000
RDX: 0000000000040000 RSI: ffffffff8186c866 RDI: 0000000000000007
RBP: 0000000020444000 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000001000
R13: 0000000020443000 R14: 1ffff920009e2f6c R15: 0000000000000000
fault_in_iov_iter_readable+0x250/0x2c0 lib/iov_iter.c:216
generic_perform_write+0x1d6/0x600 mm/filemap.c:3959
shmem_file_write_iter+0x110/0x140 mm/shmem.c:2865
call_write_iter include/linux/fs.h:1956 [inline]
new_sync_write fs/read_write.c:491 [inline]
vfs_write+0x650/0xe40 fs/read_write.c:584
ksys_write+0x12f/0x250 fs/read_write.c:637
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
RIP: 0033:0x7f40c20f3ae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f40c14550c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f40c2213050 RCX: 00007f40c20f3ae9
RDX: 00000000fffffe24 RSI: 0000000020000000 RDI: 0000000000000005
RBP: 00007f40c213f47a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007f40c2213050 R15: 00007fff49035918
Allocated by task 23775:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 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 mm/slab.h:762 [inline]
slab_alloc_node mm/slub.c:3478 [inline]
kmem_cache_alloc_node+0x195/0x3b0 mm/slub.c:3523
alloc_task_struct_node kernel/fork.c:173 [inline]
dup_task_struct kernel/fork.c:1110 [inline]
copy_process+0x41c/0x72f0 kernel/fork.c:2327
kernel_clone+0xfc/0x850 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 23787:
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+0x13c/0x190 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 mm/slub.c:1826 [inline]
slab_free mm/slub.c:3809 [inline]
kmem_cache_free+0x13a/0x4f0 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+0x20b/0x94e kernel/softirq.c:553
Last potentially related work creation:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
__kasan_record_aux_stack+0x9c/0xb0 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
release_task+0xef7/0x1b70 kernel/exit.c:282
wait_task_zombie kernel/exit.c:1210 [inline]
wait_consider_task+0x17b5/0x4000 kernel/exit.c:1437
do_wait_thread kernel/exit.c:1500 [inline]
do_wait+0x72a/0xc70 kernel/exit.c:1617
kernel_wait4+0x16d/0x280 kernel/exit.c:1780
__do_sys_wait4+0x15b/0x170 kernel/exit.c:1808
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
The buggy address belongs to the object at ffff888115fd1d00
which belongs to the cache task_struct of size 7168
The buggy address is located 176 bytes inside of
freed 7168-byte region [ffff888115fd1d00, ffff888115fd3900)
The buggy address belongs to the physical page:
page:ffffea000457f400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x115fd0
head:ffffea000457f400 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff8881409f2e81
flags: 0x200000000000840(slab|head|node=0|zone=2)
page_type: 0xffffffff()
raw: 0200000000000840 ffff888101670500 dead000000000122 0000000000000000
raw: 0000000000000000 0000000080040004 00000001ffffffff ffff8881409f2e81
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 23782, tgid 23782 (dhcpcd-run-hook), ts 1748834097069, free_ts 1748625030727
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+0x10e1/0x2fd0 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+0x12d/0x3b0 mm/slub.c:3523
alloc_task_struct_node kernel/fork.c:173 [inline]
dup_task_struct kernel/fork.c:1110 [inline]
copy_process+0x41c/0x72f0 kernel/fork.c:2327
kernel_clone+0xfc/0x850 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
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+0x460/0xa20 mm/page_alloc.c:2312
free_unref_page+0x33/0x2c0 mm/page_alloc.c:2405
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+0x4a/0x70 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+0x182/0x370 mm/slub.c:3502
getname_flags.part.0+0x50/0x4d0 fs/namei.c:140
getname_flags+0x9c/0xf0 include/linux/audit.h:321
vfs_fstatat+0x9a/0x140 fs/stat.c:294
__do_sys_newfstatat+0x98/0x110 fs/stat.c:459
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
Memory state around the buggy address:
ffff888115fd1c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888115fd1d00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888115fd1d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888115fd1e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888115fd1e80: 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: f3 0f 1e fa endbr64
6: 48 8b 0c 24 mov (%rsp),%rcx
a: 0f b7 d6 movzwl %si,%edx
d: 0f b7 f7 movzwl %di,%esi
10: bf 03 00 00 00 mov $0x3,%edi
15: e9 b8 fe ff ff jmp 0xfffffed2
1a: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1)
21: 00
22: f3 0f 1e fa endbr64
26: 48 8b 0c 24 mov (%rsp),%rcx
* 2a: 89 f2 mov %esi,%edx <-- trapping instruction
2c: 89 fe mov %edi,%esi
2e: bf 05 00 00 00 mov $0x5,%edi
33: e9 9a fe ff ff jmp 0xfffffed2
38: 66 data16
39: 2e cs
3a: 0f .byte 0xf
3b: 1f (bad)
3c: 84 00 test %al,(%rax)