==================================================================
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 ffff88801d1e59e8 by task syz-executor.5/5399
CPU: 0 PID: 5399 Comm: syz-executor.5 Not tainted 6.6.0-rc6-syzkaller-00217-gcd8892c07876 #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+0x42/0xc0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:rcu_dynticks_curr_cpu_in_eqs include/linux/context_tracking.h:122 [inline]
RIP: 0010:rcu_is_watching+0x39/0xb0 kernel/rcu/tree.c:699
Code: 70 cd 08 48 c7 c3 e8 6d 03 00 83 f8 07 89 c5 77 7a 48 8d 3c ed 40 5a 5c 8c 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 54 48 03 1c ed 40 5a 5c 8c 48 b8 00 00 00 00 00 fc
RSP: 0018:ffffc900000075b8 EFLAGS: 00000a06
RAX: dffffc0000000000 RBX: 0000000000036de8 RCX: 0000000000000100
RDX: 1ffffffff18b8b48 RSI: ffffffff8ae933a0 RDI: ffffffff8c5c5a40
RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000001 R11: 5050505000000011 R12: ffffc90000007680
R13: ffffffff81758040 R14: ffffc900000076f8 R15: ffff888032d10000
rcu_read_unlock include/linux/rcupdate.h:778 [inline]
is_bpf_text_address+0x11b/0x1a0 kernel/bpf/core.c:731
kernel_text_address kernel/extable.c:125 [inline]
kernel_text_address+0x85/0xf0 kernel/extable.c:94
__kernel_text_address+0xd/0x30 kernel/extable.c:79
unwind_get_return_address+0x78/0xe0 arch/x86/kernel/unwind_orc.c:369
arch_stack_walk+0xbe/0x170 arch/x86/kernel/stacktrace.c:26
stack_trace_save+0x96/0xd0 kernel/stacktrace.c:122
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
__kasan_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
kmalloc_reserve+0x166/0x260 net/core/skbuff.c:559
__alloc_skb+0x12b/0x330 net/core/skbuff.c:650
skb_copy+0x12d/0x3c0 net/core/skbuff.c:1976
mac80211_hwsim_tx_frame_no_nl.isra.0+0xb94/0x1300 drivers/net/wireless/virtual/mac80211_hwsim.c:1835
mac80211_hwsim_tx_frame+0x1eb/0x2a0 drivers/net/wireless/virtual/mac80211_hwsim.c:2171
mac80211_hwsim_beacon_tx+0x41b/0x730 drivers/net/wireless/virtual/mac80211_hwsim.c:2264
__iterate_interfaces+0x2d2/0x580 net/mac80211/util.c:766
ieee80211_iterate_active_interfaces_atomic+0x71/0x1b0 net/mac80211/util.c:802
mac80211_hwsim_beacon+0x101/0x200 drivers/net/wireless/virtual/mac80211_hwsim.c:2290
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x203/0xc10 kernel/time/hrtimer.c:1752
hrtimer_run_softirq+0x17d/0x350 kernel/time/hrtimer.c:1769
__do_softirq+0x218/0x965 kernel/softirq.c:553
invoke_softirq kernel/softirq.c:427 [inline]
__irq_exit_rcu kernel/softirq.c:632 [inline]
irq_exit_rcu+0xb7/0x120 kernel/softirq.c:644
sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:preempt_latency_start kernel/sched/core.c:5827 [inline]
RIP: 0010:preempt_latency_start kernel/sched/core.c:5822 [inline]
RIP: 0010:preempt_count_add+0x86/0x140 kernel/sched/core.c:5850
Code: ff 7f 39 c3 74 03 5b 5d c3 48 8b 5c 24 10 48 89 df e8 fe 43 0e 00 85 c0 75 35 65 48 8b 2c 25 c0 bc 03 00 48 8d bd b0 14 00 00 <48> b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f
RSP: 0018:ffffc900067e7620 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffffff813a56fa RCX: 1ffffffff24566bc
RDX: 0000000000000000 RSI: ffffffff813a5697 RDI: ffff888032d114b0
RBP: ffff888032d10000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: dffffc0000000000
R13: fffff52000cfcee4 R14: fffff52000cfcee3 R15: ffffc900067e76b0
unwind_next_frame+0xca/0x2390 arch/x86/kernel/unwind_orc.c:479
__unwind_start+0x5a4/0x880 arch/x86/kernel/unwind_orc.c:760
unwind_start arch/x86/include/asm/unwind.h:64 [inline]
arch_stack_walk+0xaf/0x170 arch/x86/kernel/stacktrace.c:24
stack_trace_save+0x96/0xd0 kernel/stacktrace.c:122
save_stack+0x160/0x1f0 mm/page_owner.c:128
__reset_page_owner+0x5a/0x190 mm/page_owner.c:149
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
vfree+0x181/0x7a0 mm/vmalloc.c:2842
kcov_put kernel/kcov.c:429 [inline]
kcov_put+0x26/0x40 kernel/kcov.c:425
kcov_close+0x10/0x20 kernel/kcov.c:525
__fput+0x3f7/0xa70 fs/file_table.c:384
task_work_run+0x14d/0x240 kernel/task_work.c:180
exit_task_work include/linux/task_work.h:38 [inline]
do_exit+0xa92/0x2a20 kernel/exit.c:874
do_group_exit+0xd4/0x2a0 kernel/exit.c:1024
get_signal+0x23ba/0x2790 kernel/signal.c:2892
arch_do_signal_or_restart+0x90/0x7f0 arch/x86/kernel/signal.c:309
exit_to_user_mode_loop kernel/entry/common.c:168 [inline]
exit_to_user_mode_prepare+0x11f/0x240 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
syscall_exit_to_user_mode+0x1d/0x60 kernel/entry/common.c:296
do_syscall_64+0x44/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f929b47cae9
Code: Unable to access opcode bytes at 0x7f929b47cabf.
RSP: 002b:00007f9299ffe078 EFLAGS: 00000206 ORIG_RAX: 0000000000000038
RAX: fffffffffffffff4 RBX: 00007f929b59bf80 RCX: 00007f929b47cae9
RDX: 0000000020000280 RSI: 00000000200003a0 RDI: 0000000004000000
RBP: 00007f929b4c847a R08: 0000000020000500 R09: 0000000020000500
R10: 00000000200003c0 R11: 0000000000000206 R12: 0000000000000000
R13: 000000000000000b R14: 00007f929b59bf80 R15: 00007ffedbc478a8
Allocated by task 5603:
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 22:
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
task_work_add+0x88/0x2a0 kernel/task_work.c:48
scheduler_tick+0x228/0x650 kernel/sched/core.c:5662
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
The buggy address belongs to the object at ffff88801d1e5940
which belongs to the cache task_struct of size 7360
The buggy address is located 168 bytes inside of
freed 7360-byte region [ffff88801d1e5940, ffff88801d1e7600)
The buggy address belongs to the physical page:
page:ffffea0000747800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1d1e0
head:ffffea0000747800 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88807a308d81
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014e43500 0000000000000000 dead000000000001
raw: 0000000000000000 0000000080040004 00000001ffffffff ffff88807a308d81
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 130, tgid 130 (kworker/u4:5), ts 13946808394, free_ts 0
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
user_mode_thread+0xb4/0xf0 kernel/fork.c:2987
call_usermodehelper_exec_work kernel/umh.c:172 [inline]
call_usermodehelper_exec_work+0xcb/0x170 kernel/umh.c:158
process_one_work+0x884/0x15c0 kernel/workqueue.c:2630
process_scheduled_works kernel/workqueue.c:2703 [inline]
worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784
kthread+0x33c/0x440 kernel/kthread.c:388
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
page_owner free stack trace missing
Memory state around the buggy address:
ffff88801d1e5880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88801d1e5900: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
>ffff88801d1e5980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88801d1e5a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88801d1e5a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess), 1 bytes skipped:
0: cd 08 int $0x8
2: 48 c7 c3 e8 6d 03 00 mov $0x36de8,%rbx
9: 83 f8 07 cmp $0x7,%eax
c: 89 c5 mov %eax,%ebp
e: 77 7a ja 0x8a
10: 48 8d 3c ed 40 5a 5c lea -0x73a3a5c0(,%rbp,8),%rdi
17: 8c
18: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
1f: fc ff df
22: 48 89 fa mov %rdi,%rdx
25: 48 c1 ea 03 shr $0x3,%rdx
* 29: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) <-- trapping instruction
2d: 75 54 jne 0x83
2f: 48 03 1c ed 40 5a 5c add -0x73a3a5c0(,%rbp,8),%rbx
36: 8c
37: 48 rex.W
38: b8 00 00 00 00 mov $0x0,%eax
3d: 00 fc add %bh,%ah