==================================================================
BUG: KASAN: slab-use-after-free in min_deadline_update kernel/sched/fair.c:818 [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+0x8c7/0xa60 kernel/sched/fair.c:3660
Read of size 8 at addr ffff8880183a59e8 by task syz-executor.4/9955
CPU: 0 PID: 9955 Comm: syz-executor.4 Not tainted 6.6.0-rc6-syzkaller-00244-gc3200081020d #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
min_deadline_update kernel/sched/fair.c:818 [inline]
min_deadline_cb_propagate kernel/sched/fair.c:825 [inline]
reweight_entity+0x8c7/0xa60 kernel/sched/fair.c:3660
entity_tick kernel/sched/fair.c:5317 [inline]
task_tick_fair+0xee/0xcd0 kernel/sched/fair.c:12392
scheduler_tick+0x210/0x650 kernel/sched/core.c:5657
update_process_times+0x19f/0x220 kernel/time/timer.c:2076
tick_sched_handle+0x8e/0x170 kernel/time/tick-sched.c:254
tick_sched_timer+0xe9/0x110 kernel/time/tick-sched.c:1492
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x647/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+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:orc_ip arch/x86/kernel/unwind_orc.c:80 [inline]
RIP: 0010:__orc_find+0xb0/0x130 arch/x86/kernel/unwind_orc.c:102
Code: 3f 48 c1 fa 02 48 01 d0 48 d1 f8 4c 8d 3c 83 4c 89 fa 48 c1 ea 03 42 0f b6 0c 32 4c 89 fa 83 e2 07 83 c2 03 38 ca 7c 04 84 c9 <75> 6f 49 63 17 4c 89 e7 4d 8d 2c 17 4c 89 ee e8 1c 89 4d 00 4d 39
RSP: 0018:ffffc90011a9f1c0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffffff8edeaab0 RCX: 0000000000000000
RDX: 0000000000000003 RSI: ffffffff813a3b9a RDI: 0000000000000006
RBP: ffffffff8edeaab4 R08: 0000000000000006 R09: ffffffff817572c5
R10: ffffffff817572ed R11: dffffc0000000000 R12: ffffffff817572c5
R13: ffffffff817572ed R14: dffffc0000000000 R15: ffffffff8edeaab0
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
save_stack+0x160/0x1f0 mm/page_owner.c:128
__set_page_owner+0x1f/0x60 mm/page_owner.c:192
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
__folio_alloc+0x16/0x40 mm/page_alloc.c:4458
vma_alloc_folio+0x156/0x890 mm/mempolicy.c:2258
shmem_alloc_folio+0xb5/0x170 mm/shmem.c:1658
shmem_alloc_and_acct_folio+0xcb/0x140 mm/shmem.c:1683
shmem_get_folio_gfp+0xbe9/0x1890 mm/shmem.c:2020
shmem_get_folio mm/shmem.c:2143 [inline]
shmem_write_begin+0x15c/0x460 mm/shmem.c:2688
generic_perform_write+0x278/0x600 mm/filemap.c:3969
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:0x7f5ca4a7b82f
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 b9 80 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 0c 81 02 00 48
RSP: 002b:00007f5ca58b1e70 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000004000000 RCX: 00007f5ca4a7b82f
RDX: 0000000004000000 RSI: 00007f5c9b1ff000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 000000000000ffd5
R10: 00000000000000ee R11: 0000000000000293 R12: 0000000000000003
R13: 00007f5ca58b1f3c R14: 00007f5ca58b1f40 R15: 00007f5c9b1ff000
Allocated by task 4485:
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 0:
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
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
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
schedule+0xe7/0x1b0 kernel/sched/core.c:6771
worker_thread+0x2e1/0x1290 kernel/workqueue.c:2799
kthread+0x33c/0x440 kernel/kthread.c:388
ret_from_fork+0x45/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 ffff8880183a5940
which belongs to the cache task_struct of size 7360
The buggy address is located 168 bytes inside of
freed 7360-byte region [ffff8880183a5940, ffff8880183a7600)
The buggy address belongs to the physical page:
page:ffffea000060e800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x183a0
head:ffffea000060e800 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88801edb6401
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014e43500 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000040004 00000001ffffffff ffff88801edb6401
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 21259, tgid 21259 (syz-executor.3), ts 1412727381206, free_ts 1411592187349
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_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+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
getname_flags.part.0+0x50/0x4e0 fs/namei.c:140
getname_flags include/linux/audit.h:321 [inline]
getname fs/namei.c:219 [inline]
__do_sys_unlink fs/namei.c:4447 [inline]
__se_sys_unlink fs/namei.c:4445 [inline]
__x64_sys_unlink+0xb3/0x110 fs/namei.c:4445
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:
ffff8880183a5880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880183a5900: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
>ffff8880183a5980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880183a5a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880183a5a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in min_deadline_update kernel/sched/fair.c:815 [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+0x89b/0xa60 kernel/sched/fair.c:3660
Read of size 8 at addr ffff8880183a59f0 by task syz-executor.4/9955
CPU: 0 PID: 9955 Comm: syz-executor.4 Tainted: G B 6.6.0-rc6-syzkaller-00244-gc3200081020d #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
min_deadline_update kernel/sched/fair.c:815 [inline]
min_deadline_cb_propagate kernel/sched/fair.c:825 [inline]
reweight_entity+0x89b/0xa60 kernel/sched/fair.c:3660
entity_tick kernel/sched/fair.c:5317 [inline]
task_tick_fair+0xee/0xcd0 kernel/sched/fair.c:12392
scheduler_tick+0x210/0x650 kernel/sched/core.c:5657
update_process_times+0x19f/0x220 kernel/time/timer.c:2076
tick_sched_handle+0x8e/0x170 kernel/time/tick-sched.c:254
tick_sched_timer+0xe9/0x110 kernel/time/tick-sched.c:1492
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x647/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+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:orc_ip arch/x86/kernel/unwind_orc.c:80 [inline]
RIP: 0010:__orc_find+0xb0/0x130 arch/x86/kernel/unwind_orc.c:102
Code: 3f 48 c1 fa 02 48 01 d0 48 d1 f8 4c 8d 3c 83 4c 89 fa 48 c1 ea 03 42 0f b6 0c 32 4c 89 fa 83 e2 07 83 c2 03 38 ca 7c 04 84 c9 <75> 6f 49 63 17 4c 89 e7 4d 8d 2c 17 4c 89 ee e8 1c 89 4d 00 4d 39
RSP: 0018:ffffc90011a9f1c0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffffff8edeaab0 RCX: 0000000000000000
RDX: 0000000000000003 RSI: ffffffff813a3b9a RDI: 0000000000000006
RBP: ffffffff8edeaab4 R08: 0000000000000006 R09: ffffffff817572c5
R10: ffffffff817572ed R11: dffffc0000000000 R12: ffffffff817572c5
R13: ffffffff817572ed R14: dffffc0000000000 R15: ffffffff8edeaab0
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
save_stack+0x160/0x1f0 mm/page_owner.c:128
__set_page_owner+0x1f/0x60 mm/page_owner.c:192
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
__folio_alloc+0x16/0x40 mm/page_alloc.c:4458
vma_alloc_folio+0x156/0x890 mm/mempolicy.c:2258
shmem_alloc_folio+0xb5/0x170 mm/shmem.c:1658
shmem_alloc_and_acct_folio+0xcb/0x140 mm/shmem.c:1683
shmem_get_folio_gfp+0xbe9/0x1890 mm/shmem.c:2020
shmem_get_folio mm/shmem.c:2143 [inline]
shmem_write_begin+0x15c/0x460 mm/shmem.c:2688
generic_perform_write+0x278/0x600 mm/filemap.c:3969
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:0x7f5ca4a7b82f
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 b9 80 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 0c 81 02 00 48
RSP: 002b:00007f5ca58b1e70 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000004000000 RCX: 00007f5ca4a7b82f
RDX: 0000000004000000 RSI: 00007f5c9b1ff000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 000000000000ffd5
R10: 00000000000000ee R11: 0000000000000293 R12: 0000000000000003
R13: 00007f5ca58b1f3c R14: 00007f5ca58b1f40 R15: 00007f5c9b1ff000
Allocated by task 4485:
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 0:
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
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
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
schedule+0xe7/0x1b0 kernel/sched/core.c:6771
worker_thread+0x2e1/0x1290 kernel/workqueue.c:2799
kthread+0x33c/0x440 kernel/kthread.c:388
ret_from_fork+0x45/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 ffff8880183a5940
which belongs to the cache task_struct of size 7360
The buggy address is located 176 bytes inside of
freed 7360-byte region [ffff8880183a5940, ffff8880183a7600)
The buggy address belongs to the physical page:
page:ffffea000060e800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x183a0
head:ffffea000060e800 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88801edb6401
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014e43500 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000040004 00000001ffffffff ffff88801edb6401
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 21259, tgid 21259 (syz-executor.3), ts 1412727381206, free_ts 1411592187349
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_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+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
getname_flags.part.0+0x50/0x4e0 fs/namei.c:140
getname_flags include/linux/audit.h:321 [inline]
getname fs/namei.c:219 [inline]
__do_sys_unlink fs/namei.c:4447 [inline]
__se_sys_unlink fs/namei.c:4445 [inline]
__x64_sys_unlink+0xb3/0x110 fs/namei.c:4445
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:
ffff8880183a5880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880183a5900: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
>ffff8880183a5980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880183a5a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880183a5a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
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+0x85e/0xa60 kernel/sched/fair.c:3660
Read of size 8 at addr ffff8880183a59d8 by task syz-executor.4/9955
CPU: 0 PID: 9955 Comm: syz-executor.4 Tainted: G B 6.6.0-rc6-syzkaller-00244-gc3200081020d #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
min_deadline_update kernel/sched/fair.c:819 [inline]
min_deadline_cb_propagate kernel/sched/fair.c:825 [inline]
reweight_entity+0x85e/0xa60 kernel/sched/fair.c:3660
entity_tick kernel/sched/fair.c:5317 [inline]
task_tick_fair+0xee/0xcd0 kernel/sched/fair.c:12392
scheduler_tick+0x210/0x650 kernel/sched/core.c:5657
update_process_times+0x19f/0x220 kernel/time/timer.c:2076
tick_sched_handle+0x8e/0x170 kernel/time/tick-sched.c:254
tick_sched_timer+0xe9/0x110 kernel/time/tick-sched.c:1492
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x647/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+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:orc_ip arch/x86/kernel/unwind_orc.c:80 [inline]
RIP: 0010:__orc_find+0xb0/0x130 arch/x86/kernel/unwind_orc.c:102
Code: 3f 48 c1 fa 02 48 01 d0 48 d1 f8 4c 8d 3c 83 4c 89 fa 48 c1 ea 03 42 0f b6 0c 32 4c 89 fa 83 e2 07 83 c2 03 38 ca 7c 04 84 c9 <75> 6f 49 63 17 4c 89 e7 4d 8d 2c 17 4c 89 ee e8 1c 89 4d 00 4d 39
RSP: 0018:ffffc90011a9f1c0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffffff8edeaab0 RCX: 0000000000000000
RDX: 0000000000000003 RSI: ffffffff813a3b9a RDI: 0000000000000006
RBP: ffffffff8edeaab4 R08: 0000000000000006 R09: ffffffff817572c5
R10: ffffffff817572ed R11: dffffc0000000000 R12: ffffffff817572c5
R13: ffffffff817572ed R14: dffffc0000000000 R15: ffffffff8edeaab0
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
save_stack+0x160/0x1f0 mm/page_owner.c:128
__set_page_owner+0x1f/0x60 mm/page_owner.c:192
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
__folio_alloc+0x16/0x40 mm/page_alloc.c:4458
vma_alloc_folio+0x156/0x890 mm/mempolicy.c:2258
shmem_alloc_folio+0xb5/0x170 mm/shmem.c:1658
shmem_alloc_and_acct_folio+0xcb/0x140 mm/shmem.c:1683
shmem_get_folio_gfp+0xbe9/0x1890 mm/shmem.c:2020
shmem_get_folio mm/shmem.c:2143 [inline]
shmem_write_begin+0x15c/0x460 mm/shmem.c:2688
generic_perform_write+0x278/0x600 mm/filemap.c:3969
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:0x7f5ca4a7b82f
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 b9 80 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 0c 81 02 00 48
RSP: 002b:00007f5ca58b1e70 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000004000000 RCX: 00007f5ca4a7b82f
RDX: 0000000004000000 RSI: 00007f5c9b1ff000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 000000000000ffd5
R10: 00000000000000ee R11: 0000000000000293 R12: 0000000000000003
R13: 00007f5ca58b1f3c R14: 00007f5ca58b1f40 R15: 00007f5c9b1ff000
Allocated by task 4485:
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 0:
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
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
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
schedule+0xe7/0x1b0 kernel/sched/core.c:6771
worker_thread+0x2e1/0x1290 kernel/workqueue.c:2799
kthread+0x33c/0x440 kernel/kthread.c:388
ret_from_fork+0x45/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 ffff8880183a5940
which belongs to the cache task_struct of size 7360
The buggy address is located 152 bytes inside of
freed 7360-byte region [ffff8880183a5940, ffff8880183a7600)
The buggy address belongs to the physical page:
page:ffffea000060e800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x183a0
head:ffffea000060e800 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88801edb6401
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014e43500 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000040004 00000001ffffffff ffff88801edb6401
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 21259, tgid 21259 (syz-executor.3), ts 1412727381206, free_ts 1411592187349
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_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+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
getname_flags.part.0+0x50/0x4e0 fs/namei.c:140
getname_flags include/linux/audit.h:321 [inline]
getname fs/namei.c:219 [inline]
__do_sys_unlink fs/namei.c:4447 [inline]
__se_sys_unlink fs/namei.c:4445 [inline]
__x64_sys_unlink+0xb3/0x110 fs/namei.c:4445
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:
ffff8880183a5880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880183a5900: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
>ffff8880183a5980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880183a5a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880183a5a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in min_deadline_update kernel/sched/fair.c:820 [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+0x87f/0xa60 kernel/sched/fair.c:3660
Read of size 8 at addr ffff8880183a59e0 by task syz-executor.4/9955
CPU: 0 PID: 9955 Comm: syz-executor.4 Tainted: G B 6.6.0-rc6-syzkaller-00244-gc3200081020d #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
min_deadline_update kernel/sched/fair.c:820 [inline]
min_deadline_cb_propagate kernel/sched/fair.c:825 [inline]
reweight_entity+0x87f/0xa60 kernel/sched/fair.c:3660
entity_tick kernel/sched/fair.c:5317 [inline]
task_tick_fair+0xee/0xcd0 kernel/sched/fair.c:12392
scheduler_tick+0x210/0x650 kernel/sched/core.c:5657
update_process_times+0x19f/0x220 kernel/time/timer.c:2076
tick_sched_handle+0x8e/0x170 kernel/time/tick-sched.c:254
tick_sched_timer+0xe9/0x110 kernel/time/tick-sched.c:1492
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x647/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+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:orc_ip arch/x86/kernel/unwind_orc.c:80 [inline]
RIP: 0010:__orc_find+0xb0/0x130 arch/x86/kernel/unwind_orc.c:102
Code: 3f 48 c1 fa 02 48 01 d0 48 d1 f8 4c 8d 3c 83 4c 89 fa 48 c1 ea 03 42 0f b6 0c 32 4c 89 fa 83 e2 07 83 c2 03 38 ca 7c 04 84 c9 <75> 6f 49 63 17 4c 89 e7 4d 8d 2c 17 4c 89 ee e8 1c 89 4d 00 4d 39
RSP: 0018:ffffc90011a9f1c0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffffff8edeaab0 RCX: 0000000000000000
RDX: 0000000000000003 RSI: ffffffff813a3b9a RDI: 0000000000000006
RBP: ffffffff8edeaab4 R08: 0000000000000006 R09: ffffffff817572c5
R10: ffffffff817572ed R11: dffffc0000000000 R12: ffffffff817572c5
R13: ffffffff817572ed R14: dffffc0000000000 R15: ffffffff8edeaab0
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
save_stack+0x160/0x1f0 mm/page_owner.c:128
__set_page_owner+0x1f/0x60 mm/page_owner.c:192
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
__folio_alloc+0x16/0x40 mm/page_alloc.c:4458
vma_alloc_folio+0x156/0x890 mm/mempolicy.c:2258
shmem_alloc_folio+0xb5/0x170 mm/shmem.c:1658
shmem_alloc_and_acct_folio+0xcb/0x140 mm/shmem.c:1683
shmem_get_folio_gfp+0xbe9/0x1890 mm/shmem.c:2020
shmem_get_folio mm/shmem.c:2143 [inline]
shmem_write_begin+0x15c/0x460 mm/shmem.c:2688
generic_perform_write+0x278/0x600 mm/filemap.c:3969
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:0x7f5ca4a7b82f
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 b9 80 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 0c 81 02 00 48
RSP: 002b:00007f5ca58b1e70 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000004000000 RCX: 00007f5ca4a7b82f
RDX: 0000000004000000 RSI: 00007f5c9b1ff000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 000000000000ffd5
R10: 00000000000000ee R11: 0000000000000293 R12: 0000000000000003
R13: 00007f5ca58b1f3c R14: 00007f5ca58b1f40 R15: 00007f5c9b1ff000
Allocated by task 4485:
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 0:
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
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
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
schedule+0xe7/0x1b0 kernel/sched/core.c:6771
worker_thread+0x2e1/0x1290 kernel/workqueue.c:2799
kthread+0x33c/0x440 kernel/kthread.c:388
ret_from_fork+0x45/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 ffff8880183a5940
which belongs to the cache task_struct of size 7360
The buggy address is located 160 bytes inside of
freed 7360-byte region [ffff8880183a5940, ffff8880183a7600)
The buggy address belongs to the physical page:
page:ffffea000060e800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x183a0
head:ffffea000060e800 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88801edb6401
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014e43500 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000040004 00000001ffffffff ffff88801edb6401
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 21259, tgid 21259 (syz-executor.3), ts 1412727381206, free_ts 1411592187349
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_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+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
getname_flags.part.0+0x50/0x4e0 fs/namei.c:140
getname_flags include/linux/audit.h:321 [inline]
getname fs/namei.c:219 [inline]
__do_sys_unlink fs/namei.c:4447 [inline]
__se_sys_unlink fs/namei.c:4445 [inline]
__x64_sys_unlink+0xb3/0x110 fs/namei.c:4445
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:
ffff8880183a5880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880183a5900: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
>ffff8880183a5980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880183a5a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880183a5a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in min_deadline_update kernel/sched/fair.c:818 [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+0x8c7/0xa60 kernel/sched/fair.c:3660
Read of size 8 at addr ffff8880183a59e8 by task syz-executor.4/9955
CPU: 0 PID: 9955 Comm: syz-executor.4 Tainted: G B 6.6.0-rc6-syzkaller-00244-gc3200081020d #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
min_deadline_update kernel/sched/fair.c:818 [inline]
min_deadline_cb_propagate kernel/sched/fair.c:825 [inline]
reweight_entity+0x8c7/0xa60 kernel/sched/fair.c:3660
entity_tick kernel/sched/fair.c:5317 [inline]
task_tick_fair+0xee/0xcd0 kernel/sched/fair.c:12392
scheduler_tick+0x210/0x650 kernel/sched/core.c:5657
update_process_times+0x19f/0x220 kernel/time/timer.c:2076
tick_sched_handle+0x8e/0x170 kernel/time/tick-sched.c:254
tick_sched_timer+0xe9/0x110 kernel/time/tick-sched.c:1492
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x647/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+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:orc_ip arch/x86/kernel/unwind_orc.c:80 [inline]
RIP: 0010:__orc_find+0xb0/0x130 arch/x86/kernel/unwind_orc.c:102
Code: 3f 48 c1 fa 02 48 01 d0 48 d1 f8 4c 8d 3c 83 4c 89 fa 48 c1 ea 03 42 0f b6 0c 32 4c 89 fa 83 e2 07 83 c2 03 38 ca 7c 04 84 c9 <75> 6f 49 63 17 4c 89 e7 4d 8d 2c 17 4c 89 ee e8 1c 89 4d 00 4d 39
RSP: 0018:ffffc90011a9f1c0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffffff8edeaab0 RCX: 0000000000000000
RDX: 0000000000000003 RSI: ffffffff813a3b9a RDI: 0000000000000006
RBP: ffffffff8edeaab4 R08: 0000000000000006 R09: ffffffff817572c5
R10: ffffffff817572ed R11: dffffc0000000000 R12: ffffffff817572c5
R13: ffffffff817572ed R14: dffffc0000000000 R15: ffffffff8edeaab0
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
save_stack+0x160/0x1f0 mm/page_owner.c:128
__set_page_owner+0x1f/0x60 mm/page_owner.c:192
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
__folio_alloc+0x16/0x40 mm/page_alloc.c:4458
vma_alloc_folio+0x156/0x890 mm/mempolicy.c:2258
shmem_alloc_folio+0xb5/0x170 mm/shmem.c:1658
shmem_alloc_and_acct_folio+0xcb/0x140 mm/shmem.c:1683
shmem_get_folio_gfp+0xbe9/0x1890 mm/shmem.c:2020
shmem_get_folio mm/shmem.c:2143 [inline]
shmem_write_begin+0x15c/0x460 mm/shmem.c:2688
generic_perform_write+0x278/0x600 mm/filemap.c:3969
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:0x7f5ca4a7b82f
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 b9 80 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 0c 81 02 00 48
RSP: 002b:00007f5ca58b1e70 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000004000000 RCX: 00007f5ca4a7b82f
RDX: 0000000004000000 RSI: 00007f5c9b1ff000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 000000000000ffd5
R10: 00000000000000ee R11: 0000000000000293 R12: 0000000000000003
R13: 00007f5ca58b1f3c R14: 00007f5ca58b1f40 R15: 00007f5c9b1ff000
Allocated by task 4485:
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 0:
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
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
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
schedule+0xe7/0x1b0 kernel/sched/core.c:6771
worker_thread+0x2e1/0x1290 kernel/workqueue.c:2799
kthread+0x33c/0x440 kernel/kthread.c:388
ret_from_fork+0x45/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 ffff8880183a5940
which belongs to the cache task_struct of size 7360
The buggy address is located 168 bytes inside of
freed 7360-byte region [ffff8880183a5940, ffff8880183a7600)
The buggy address belongs to the physical page:
page:ffffea000060e800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x183a0
head:ffffea000060e800 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88801edb6401
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014e43500 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000040004 00000001ffffffff ffff88801edb6401
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 21259, tgid 21259 (syz-executor.3), ts 1412727381206, free_ts 1411592187349
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_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+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
getname_flags.part.0+0x50/0x4e0 fs/namei.c:140
getname_flags include/linux/audit.h:321 [inline]
getname fs/namei.c:219 [inline]
__do_sys_unlink fs/namei.c:4447 [inline]
__se_sys_unlink fs/namei.c:4445 [inline]
__x64_sys_unlink+0xb3/0x110 fs/namei.c:4445
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:
ffff8880183a5880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880183a5900: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
>ffff8880183a5980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880183a5a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880183a5a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in min_deadline_update kernel/sched/fair.c:815 [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+0x89b/0xa60 kernel/sched/fair.c:3660
Read of size 8 at addr ffff8880183a59f0 by task syz-executor.4/9955
CPU: 0 PID: 9955 Comm: syz-executor.4 Tainted: G B 6.6.0-rc6-syzkaller-00244-gc3200081020d #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
min_deadline_update kernel/sched/fair.c:815 [inline]
min_deadline_cb_propagate kernel/sched/fair.c:825 [inline]
reweight_entity+0x89b/0xa60 kernel/sched/fair.c:3660
entity_tick kernel/sched/fair.c:5317 [inline]
task_tick_fair+0xee/0xcd0 kernel/sched/fair.c:12392
scheduler_tick+0x210/0x650 kernel/sched/core.c:5657
update_process_times+0x19f/0x220 kernel/time/timer.c:2076
tick_sched_handle+0x8e/0x170 kernel/time/tick-sched.c:254
tick_sched_timer+0xe9/0x110 kernel/time/tick-sched.c:1492
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x647/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+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:orc_ip arch/x86/kernel/unwind_orc.c:80 [inline]
RIP: 0010:__orc_find+0xb0/0x130 arch/x86/kernel/unwind_orc.c:102
Code: 3f 48 c1 fa 02 48 01 d0 48 d1 f8 4c 8d 3c 83 4c 89 fa 48 c1 ea 03 42 0f b6 0c 32 4c 89 fa 83 e2 07 83 c2 03 38 ca 7c 04 84 c9 <75> 6f 49 63 17 4c 89 e7 4d 8d 2c 17 4c 89 ee e8 1c 89 4d 00 4d 39
RSP: 0018:ffffc90011a9f1c0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffffff8edeaab0 RCX: 0000000000000000
RDX: 0000000000000003 RSI: ffffffff813a3b9a RDI: 0000000000000006
RBP: ffffffff8edeaab4 R08: 0000000000000006 R09: ffffffff817572c5
R10: ffffffff817572ed R11: dffffc0000000000 R12: ffffffff817572c5
R13: ffffffff817572ed R14: dffffc0000000000 R15: ffffffff8edeaab0
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
save_stack+0x160/0x1f0 mm/page_owner.c:128
__set_page_owner+0x1f/0x60 mm/page_owner.c:192
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
__folio_alloc+0x16/0x40 mm/page_alloc.c:4458
vma_alloc_folio+0x156/0x890 mm/mempolicy.c:2258
shmem_alloc_folio+0xb5/0x170 mm/shmem.c:1658
shmem_alloc_and_acct_folio+0xcb/0x140 mm/shmem.c:1683
shmem_get_folio_gfp+0xbe9/0x1890 mm/shmem.c:2020
shmem_get_folio mm/shmem.c:2143 [inline]
shmem_write_begin+0x15c/0x460 mm/shmem.c:2688
generic_perform_write+0x278/0x600 mm/filemap.c:3969
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:0x7f5ca4a7b82f
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 b9 80 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 0c 81 02 00 48
RSP: 002b:00007f5ca58b1e70 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000004000000 RCX: 00007f5ca4a7b82f
RDX: 0000000004000000 RSI: 00007f5c9b1ff000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 000000000000ffd5
R10: 00000000000000ee R11: 0000000000000293 R12: 0000000000000003
R13: 00007f5ca58b1f3c R14: 00007f5ca58b1f40 R15: 00007f5c9b1ff000
Allocated by task 4485:
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 0:
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
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
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
schedule+0xe7/0x1b0 kernel/sched/core.c:6771
worker_thread+0x2e1/0x1290 kernel/workqueue.c:2799
kthread+0x33c/0x440 kernel/kthread.c:388
ret_from_fork+0x45/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 ffff8880183a5940
which belongs to the cache task_struct of size 7360
The buggy address is located 176 bytes inside of
freed 7360-byte region [ffff8880183a5940, ffff8880183a7600)
The buggy address belongs to the physical page:
page:ffffea000060e800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x183a0
head:ffffea000060e800 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88801edb6401
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014e43500 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000040004 00000001ffffffff ffff88801edb6401
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 21259, tgid 21259 (syz-executor.3), ts 1412727381206, free_ts 1411592187349
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_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+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
getname_flags.part.0+0x50/0x4e0 fs/namei.c:140
getname_flags include/linux/audit.h:321 [inline]
getname fs/namei.c:219 [inline]
__do_sys_unlink fs/namei.c:4447 [inline]
__se_sys_unlink fs/namei.c:4445 [inline]
__x64_sys_unlink+0xb3/0x110 fs/namei.c:4445
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:
ffff8880183a5880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880183a5900: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
>ffff8880183a5980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880183a5a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880183a5a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
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+0x85e/0xa60 kernel/sched/fair.c:3660
Read of size 8 at addr ffff8880183a59d8 by task syz-executor.4/9955
CPU: 0 PID: 9955 Comm: syz-executor.4 Tainted: G B 6.6.0-rc6-syzkaller-00244-gc3200081020d #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
min_deadline_update kernel/sched/fair.c:819 [inline]
min_deadline_cb_propagate kernel/sched/fair.c:825 [inline]
reweight_entity+0x85e/0xa60 kernel/sched/fair.c:3660
entity_tick kernel/sched/fair.c:5317 [inline]
task_tick_fair+0xee/0xcd0 kernel/sched/fair.c:12392
scheduler_tick+0x210/0x650 kernel/sched/core.c:5657
update_process_times+0x19f/0x220 kernel/time/timer.c:2076
tick_sched_handle+0x8e/0x170 kernel/time/tick-sched.c:254
tick_sched_timer+0xe9/0x110 kernel/time/tick-sched.c:1492
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x647/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+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:orc_ip arch/x86/kernel/unwind_orc.c:80 [inline]
RIP: 0010:__orc_find+0xb0/0x130 arch/x86/kernel/unwind_orc.c:102
Code: 3f 48 c1 fa 02 48 01 d0 48 d1 f8 4c 8d 3c 83 4c 89 fa 48 c1 ea 03 42 0f b6 0c 32 4c 89 fa 83 e2 07 83 c2 03 38 ca 7c 04 84 c9 <75> 6f 49 63 17 4c 89 e7 4d 8d 2c 17 4c 89 ee e8 1c 89 4d 00 4d 39
RSP: 0018:ffffc90011a9f1c0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffffff8edeaab0 RCX: 0000000000000000
RDX: 0000000000000003 RSI: ffffffff813a3b9a RDI: 0000000000000006
RBP: ffffffff8edeaab4 R08: 0000000000000006 R09: ffffffff817572c5
R10: ffffffff817572ed R11: dffffc0000000000 R12: ffffffff817572c5
R13: ffffffff817572ed R14: dffffc0000000000 R15: ffffffff8edeaab0
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
save_stack+0x160/0x1f0 mm/page_owner.c:128
__set_page_owner+0x1f/0x60 mm/page_owner.c:192
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
__folio_alloc+0x16/0x40 mm/page_alloc.c:4458
vma_alloc_folio+0x156/0x890 mm/mempolicy.c:2258
shmem_alloc_folio+0xb5/0x170 mm/shmem.c:1658
shmem_alloc_and_acct_folio+0xcb/0x140 mm/shmem.c:1683
shmem_get_folio_gfp+0xbe9/0x1890 mm/shmem.c:2020
shmem_get_folio mm/shmem.c:2143 [inline]
shmem_write_begin+0x15c/0x460 mm/shmem.c:2688
generic_perform_write+0x278/0x600 mm/filemap.c:3969
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:0x7f5ca4a7b82f
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 b9 80 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 0c 81 02 00 48
RSP: 002b:00007f5ca58b1e70 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000004000000 RCX: 00007f5ca4a7b82f
RDX: 0000000004000000 RSI: 00007f5c9b1ff000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 000000000000ffd5
R10: 00000000000000ee R11: 0000000000000293 R12: 0000000000000003
R13: 00007f5ca58b1f3c R14: 00007f5ca58b1f40 R15: 00007f5c9b1ff000
Allocated by task 4485:
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 0:
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
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
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
schedule+0xe7/0x1b0 kernel/sched/core.c:6771
worker_thread+0x2e1/0x1290 kernel/workqueue.c:2799
kthread+0x33c/0x440 kernel/kthread.c:388
ret_from_fork+0x45/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 ffff8880183a5940
which belongs to the cache task_struct of size 7360
The buggy address is located 152 bytes inside of
freed 7360-byte region [ffff8880183a5940, ffff8880183a7600)
The buggy address belongs to the physical page:
page:ffffea000060e800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x183a0
head:ffffea000060e800 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88801edb6401
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014e43500 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000040004 00000001ffffffff ffff88801edb6401
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 21259, tgid 21259 (syz-executor.3), ts 1412727381206, free_ts 1411592187349
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_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+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
getname_flags.part.0+0x50/0x4e0 fs/namei.c:140
getname_flags include/linux/audit.h:321 [inline]
getname fs/namei.c:219 [inline]
__do_sys_unlink fs/namei.c:4447 [inline]
__se_sys_unlink fs/namei.c:4445 [inline]
__x64_sys_unlink+0xb3/0x110 fs/namei.c:4445
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:
ffff8880183a5880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880183a5900: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
>ffff8880183a5980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880183a5a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880183a5a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in min_deadline_update kernel/sched/fair.c:820 [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+0x87f/0xa60 kernel/sched/fair.c:3660
Read of size 8 at addr ffff8880183a59e0 by task syz-executor.4/9955
CPU: 0 PID: 9955 Comm: syz-executor.4 Tainted: G B 6.6.0-rc6-syzkaller-00244-gc3200081020d #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
min_deadline_update kernel/sched/fair.c:820 [inline]
min_deadline_cb_propagate kernel/sched/fair.c:825 [inline]
reweight_entity+0x87f/0xa60 kernel/sched/fair.c:3660
entity_tick kernel/sched/fair.c:5317 [inline]
task_tick_fair+0xee/0xcd0 kernel/sched/fair.c:12392
scheduler_tick+0x210/0x650 kernel/sched/core.c:5657
update_process_times+0x19f/0x220 kernel/time/timer.c:2076
tick_sched_handle+0x8e/0x170 kernel/time/tick-sched.c:254
tick_sched_timer+0xe9/0x110 kernel/time/tick-sched.c:1492
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x647/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+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:orc_ip arch/x86/kernel/unwind_orc.c:80 [inline]
RIP: 0010:__orc_find+0xb0/0x130 arch/x86/kernel/unwind_orc.c:102
Code: 3f 48 c1 fa 02 48 01 d0 48 d1 f8 4c 8d 3c 83 4c 89 fa 48 c1 ea 03 42 0f b6 0c 32 4c 89 fa 83 e2 07 83 c2 03 38 ca 7c 04 84 c9 <75> 6f 49 63 17 4c 89 e7 4d 8d 2c 17 4c 89 ee e8 1c 89 4d 00 4d 39
RSP: 0018:ffffc90011a9f1c0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffffff8edeaab0 RCX: 0000000000000000
RDX: 0000000000000003 RSI: ffffffff813a3b9a RDI: 0000000000000006
RBP: ffffffff8edeaab4 R08: 0000000000000006 R09: ffffffff817572c5
R10: ffffffff817572ed R11: dffffc0000000000 R12: ffffffff817572c5
R13: ffffffff817572ed R14: dffffc0000000000 R15: ffffffff8edeaab0
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
save_stack+0x160/0x1f0 mm/page_owner.c:128
__set_page_owner+0x1f/0x60 mm/page_owner.c:192
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
__folio_alloc+0x16/0x40 mm/page_alloc.c:4458
vma_alloc_folio+0x156/0x890 mm/mempolicy.c:2258
shmem_alloc_folio+0xb5/0x170 mm/shmem.c:1658
shmem_alloc_and_acct_folio+0xcb/0x140 mm/shmem.c:1683
shmem_get_folio_gfp+0xbe9/0x1890 mm/shmem.c:2020
shmem_get_folio mm/shmem.c:2143 [inline]
shmem_write_begin+0x15c/0x460 mm/shmem.c:2688
generic_perform_write+0x278/0x600 mm/filemap.c:3969
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:0x7f5ca4a7b82f
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 b9 80 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 0c 81 02 00 48
RSP: 002b:00007f5ca58b1e70 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000004000000 RCX: 00007f5ca4a7b82f
RDX: 0000000004000000 RSI: 00007f5c9b1ff000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 000000000000ffd5
R10: 00000000000000ee R11: 0000000000000293 R12: 0000000000000003
R13: 00007f5ca58b1f3c R14: 00007f5ca58b1f40 R15: 00007f5c9b1ff000
Allocated by task 4485:
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 0:
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
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
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
schedule+0xe7/0x1b0 kernel/sched/core.c:6771
worker_thread+0x2e1/0x1290 kernel/workqueue.c:2799
kthread+0x33c/0x440 kernel/kthread.c:388
ret_from_fork+0x45/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 ffff8880183a5940
which belongs to the cache task_struct of size 7360
The buggy address is located 160 bytes inside of
freed 7360-byte region [ffff8880183a5940, ffff8880183a7600)
The buggy address belongs to the physical page:
page:ffffea000060e800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x183a0
head:ffffea000060e800 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88801edb6401
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014e43500 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000040004 00000001ffffffff ffff88801edb6401
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 21259, tgid 21259 (syz-executor.3), ts 1412727381206, free_ts 1411592187349
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_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+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
getname_flags.part.0+0x50/0x4e0 fs/namei.c:140
getname_flags include/linux/audit.h:321 [inline]
getname fs/namei.c:219 [inline]
__do_sys_unlink fs/namei.c:4447 [inline]
__se_sys_unlink fs/namei.c:4445 [inline]
__x64_sys_unlink+0xb3/0x110 fs/namei.c:4445
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:
ffff8880183a5880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880183a5900: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
>ffff8880183a5980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880183a5a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880183a5a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in min_deadline_update kernel/sched/fair.c:818 [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+0x8c7/0xa60 kernel/sched/fair.c:3660
Read of size 8 at addr ffff8880183a59e8 by task syz-executor.4/9955
CPU: 0 PID: 9955 Comm: syz-executor.4 Tainted: G B 6.6.0-rc6-syzkaller-00244-gc3200081020d #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
min_deadline_update kernel/sched/fair.c:818 [inline]
min_deadline_cb_propagate kernel/sched/fair.c:825 [inline]
reweight_entity+0x8c7/0xa60 kernel/sched/fair.c:3660
entity_tick kernel/sched/fair.c:5317 [inline]
task_tick_fair+0xee/0xcd0 kernel/sched/fair.c:12392
scheduler_tick+0x210/0x650 kernel/sched/core.c:5657
update_process_times+0x19f/0x220 kernel/time/timer.c:2076
tick_sched_handle+0x8e/0x170 kernel/time/tick-sched.c:254
tick_sched_timer+0xe9/0x110 kernel/time/tick-sched.c:1492
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x647/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+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:orc_ip arch/x86/kernel/unwind_orc.c:80 [inline]
RIP: 0010:__orc_find+0xb0/0x130 arch/x86/kernel/unwind_orc.c:102
Code: 3f 48 c1 fa 02 48 01 d0 48 d1 f8 4c 8d 3c 83 4c 89 fa 48 c1 ea 03 42 0f b6 0c 32 4c 89 fa 83 e2 07 83 c2 03 38 ca 7c 04 84 c9 <75> 6f 49 63 17 4c 89 e7 4d 8d 2c 17 4c 89 ee e8 1c 89 4d 00 4d 39
RSP: 0018:ffffc90011a9f1c0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffffff8edeaab0 RCX: 0000000000000000
RDX: 0000000000000003 RSI: ffffffff813a3b9a RDI: 0000000000000006
RBP: ffffffff8edeaab4 R08: 0000000000000006 R09: ffffffff817572c5
R10: ffffffff817572ed R11: dffffc0000000000 R12: ffffffff817572c5
R13: ffffffff817572ed R14: dffffc0000000000 R15: ffffffff8edeaab0
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
save_stack+0x160/0x1f0 mm/page_owner.c:128
__set_page_owner+0x1f/0x60 mm/page_owner.c:192
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
__folio_alloc+0x16/0x40 mm/page_alloc.c:4458
vma_alloc_folio+0x156/0x890 mm/mempolicy.c:2258
shmem_alloc_folio+0xb5/0x170 mm/shmem.c:1658
shmem_alloc_and_acct_folio+0xcb/0x140 mm/shmem.c:1683
shmem_get_folio_gfp+0xbe9/0x1890 mm/shmem.c:2020
shmem_get_folio mm/shmem.c:2143 [inline]
shmem_write_begin+0x15c/0x460 mm/shmem.c:2688
generic_perform_write+0x278/0x600 mm/filemap.c:3969
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:0x7f5ca4a7b82f
Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 b9 80 02 00 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 0c 81 02 00 48
RSP: 002b:00007f5ca58b1e70 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000004000000 RCX: 00007f5ca4a7b82f
RDX: 0000000004000000 RSI: 00007f5c9b1ff000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 000000000000ffd5
R10: 00000000000000ee R11: 0000000000000293 R12: 0000000000000003
R13: 00007f5ca58b1f3c R14: 00007f5ca58b1f40 R15: 00007f5c9b1ff000
Allocated by task 4485:
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 0:
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
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
Second to last potentially related work creation:
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 48 c1 fa 02 sar $0x2,%rdx
4: 48 01 d0 add %rdx,%rax
7: 48 d1 f8 sar %rax
a: 4c 8d 3c 83 lea (%rbx,%rax,4),%r15
e: 4c 89 fa mov %r15,%rdx
11: 48 c1 ea 03 shr $0x3,%rdx
15: 42 0f b6 0c 32 movzbl (%rdx,%r14,1),%ecx
1a: 4c 89 fa mov %r15,%rdx
1d: 83 e2 07 and $0x7,%edx
20: 83 c2 03 add $0x3,%edx
23: 38 ca cmp %cl,%dl
25: 7c 04 jl 0x2b
27: 84 c9 test %cl,%cl
* 29: 75 6f jne 0x9a <-- trapping instruction
2b: 49 63 17 movslq (%r15),%rdx
2e: 4c 89 e7 mov %r12,%rdi
31: 4d 8d 2c 17 lea (%r15,%rdx,1),%r13
35: 4c 89 ee mov %r13,%rsi
38: e8 1c 89 4d 00 call 0x4d8959
3d: 4d rex.WRB
3e: 39 .byte 0x39