==================================================================
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 ffff88801fb19e68 by task syz-executor.4/8714
CPU: 1 PID: 8714 Comm: syz-executor.4 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:lock_release+0x3b8/0x680 kernel/locking/lockdep.c:5761
Code: 7e 83 f8 01 0f 85 dd 01 00 00 9c 58 f6 c4 02 0f 85 c8 01 00 00 48 f7 04 24 00 02 00 00 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c5 48 c7 45 00 00 00 00 00 c7 45 08 00 00 00 00 48 8b 84 24
RSP: 0000:ffffc900001f0d30 EFLAGS: 00000206
RAX: dffffc0000000000 RBX: ffffffffffffffff RCX: ffffc900001f0d80
RDX: 1ffff1100457d50f RSI: ffffffff8a8cafa0 RDI: ffffffff8ae93420
RBP: 1ffff9200003e1a8 R08: 0000000000000000 R09: fffffbfff1d9835a
R10: ffffffff8ecc1ad7 R11: ffffffff8187dad7 R12: 0000000000000000
R13: 0000000000000001 R14: ffff888022bea880 R15: ffff888022be9dc0
rcu_lock_release include/linux/rcupdate.h:308 [inline]
rcu_read_unlock include/linux/rcupdate.h:782 [inline]
ieee80211_rx_napi+0x112/0x400 net/mac80211/rx.c:5419
ieee80211_rx include/net/mac80211.h:4952 [inline]
ieee80211_tasklet_handler+0xd2/0x130 net/mac80211/main.c:316
tasklet_action_common.constprop.0+0x242/0x3d0 kernel/softirq.c:780
__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:exit_to_user_mode_loop kernel/entry/common.c:158 [inline]
RIP: 0010:exit_to_user_mode_prepare+0x100/0x240 kernel/entry/common.c:204
Code: 9c 58 fa f6 c4 02 0f 85 ef 00 00 00 e8 c9 52 ca 08 48 8b 5d 00 f7 c3 0e 30 02 00 0f 84 47 ff ff ff e8 54 03 1b 00 fb f6 c3 08 <75> bd f6 c7 10 74 c2 4c 89 e7 e8 91 66 40 00 f7 c3 04 00 02 00 74
RSP: 0000:ffffc90006a67f30 EFLAGS: 00000202
RAX: 0000000000008d63 RBX: 0000000000000008 RCX: 1ffffffff1d97d29
RDX: 0000000000000000 RSI: ffffffff8a8caca0 RDI: ffffffff8ae93420
RBP: ffff888022be9dc0 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff8ecc1ad7 R11: 0000000000000000 R12: ffffc90006a67f58
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
irqentry_exit_to_user_mode+0x9/0x40 kernel/entry/common.c:309
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0033:0x7f3a43a2d571
Code: d0 48 f7 64 24 28 31 c0 41 8b 36 4c 8d 25 61 a4 09 00 48 8d 2d 1a af 09 00 48 c1 ea 12 48 01 ca 48 89 d9 48 2b 15 97 aa 16 00 <31> db e8 a8 8b ff ff 41 8b 76 2c 85 f6 7e 2c 48 85 db 74 0a 4c 89
RSP: 002b:00007f3a448540f0 EFLAGS: 00000216
RAX: 0000000000000000 RBX: 00007f3a43ac93a7 RCX: 00007f3a43ac93a7
RDX: 0000000000036a09 RSI: 0000000000000000 RDI: 00007f3a43ac79a6
RBP: 00007f3a43ac847a R08: 000000000000047c R09: 0000000000000001
R10: 00007ffe8022b080 R11: 00000000002e54ac R12: 00007f3a43ac79ba
R13: 000000000000000b R14: 00007f3a43b9bf80 R15: 00007ffe80212418
Allocated by task 2:
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
kernel_thread+0xc0/0x100 kernel/fork.c:2971
create_kthread kernel/kthread.c:411 [inline]
kthreadd+0x4fb/0x7d0 kernel/kthread.c:746
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
Freed by task 7410:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
kasan_set_track+0x25/0x30 mm/kasan/common.c:52
kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522
____kasan_slab_free mm/kasan/common.c:236 [inline]
____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1800 [inline]
slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826
slab_free mm/slub.c:3809 [inline]
kmem_cache_free+0xf0/0x480 mm/slub.c:3831
put_task_struct include/linux/sched/task.h:136 [inline]
put_task_struct include/linux/sched/task.h:123 [inline]
delayed_put_task_struct+0x21b/0x2b0 kernel/exit.c:226
rcu_do_batch kernel/rcu/tree.c:2139 [inline]
rcu_core+0x805/0x1bb0 kernel/rcu/tree.c:2403
__do_softirq+0x218/0x965 kernel/softirq.c:553
Last potentially related work creation:
kasan_save_stack+0x33/0x50 mm/kasan/common.c:45
__kasan_record_aux_stack+0xbc/0xd0 mm/kasan/generic.c:492
__call_rcu_common.constprop.0+0x9a/0x790 kernel/rcu/tree.c:2653
put_task_struct_rcu_user kernel/exit.c:232 [inline]
put_task_struct_rcu_user+0x87/0xc0 kernel/exit.c:229
context_switch kernel/sched/core.c:5385 [inline]
__schedule+0xee9/0x5a10 kernel/sched/core.c:6695
preempt_schedule_irq+0x52/0x90 kernel/sched/core.c:7007
irqentry_exit+0x35/0x80 kernel/entry/common.c:432
asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:650
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
release_task+0xef7/0x1b70 kernel/exit.c:282
wait_task_zombie kernel/exit.c:1210 [inline]
wait_consider_task+0x17b5/0x4000 kernel/exit.c:1437
do_wait_thread kernel/exit.c:1500 [inline]
do_wait+0x72a/0xc70 kernel/exit.c:1617
kernel_wait4+0x16d/0x280 kernel/exit.c:1780
__do_sys_wait4+0x15b/0x170 kernel/exit.c:1808
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
The buggy address belongs to the object at ffff88801fb19dc0
which belongs to the cache task_struct of size 7360
The buggy address is located 168 bytes inside of
freed 7360-byte region [ffff88801fb19dc0, ffff88801fb1ba80)
The buggy address belongs to the physical page:
page:ffffea00007ec600 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1fb18
head:ffffea00007ec600 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888029de7601
ksm flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014e43500 ffffea0001957200 dead000000000003
raw: 0000000000000000 0000000080040004 00000001ffffffff ffff888029de7601
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 42, tgid 42 (kworker/u4:2), ts 15942148112, 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:
ffff88801fb19d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88801fb19d80: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
>ffff88801fb19e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88801fb19e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88801fb19f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 7e 83 jle 0xffffff85
2: f8 clc
3: 01 0f add %ecx,(%rdi)
5: 85 dd test %ebx,%ebp
7: 01 00 add %eax,(%rax)
9: 00 9c 58 f6 c4 02 0f add %bl,0xf02c4f6(%rax,%rbx,2)
10: 85 c8 test %ecx,%eax
12: 01 00 add %eax,(%rax)
14: 00 48 f7 add %cl,-0x9(%rax)
17: 04 24 add $0x24,%al
19: 00 02 add %al,(%rdx)
1b: 00 00 add %al,(%rax)
1d: 74 01 je 0x20
1f: fb sti
20: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
27: fc ff df
* 2a: 48 01 c5 add %rax,%rbp <-- trapping instruction
2d: 48 c7 45 00 00 00 00 movq $0x0,0x0(%rbp)
34: 00
35: c7 45 08 00 00 00 00 movl $0x0,0x8(%rbp)
3c: 48 rex.W
3d: 8b .byte 0x8b
3e: 84 .byte 0x84
3f: 24 .byte 0x24