==================================================================
BUG: KASAN: slab-use-after-free in __update_min_deadline kernel/sched/fair.c:805 [inline]
BUG: KASAN: slab-use-after-free in min_deadline_update kernel/sched/fair.c: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+0x4e6/0x8f0 kernel/sched/fair.c:3660
Read of size 8 at addr ffff8880238a9e70 by task syz-executor.5/27604
CPU: 1 PID: 27604 Comm: syz-executor.5 Not tainted 6.6.0-rc6-syzkaller-00039-g06dc10eae55b #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+0x1e7/0x2d0 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0x163/0x540 mm/kasan/report.c:475
kasan_report+0x175/0x1b0 mm/kasan/report.c:588
__update_min_deadline kernel/sched/fair.c:805 [inline]
min_deadline_update kernel/sched/fair.c:820 [inline]
min_deadline_cb_propagate kernel/sched/fair.c:825 [inline]
reweight_entity+0x4e6/0x8f0 kernel/sched/fair.c:3660
update_cfs_group kernel/sched/fair.c:3826 [inline]
entity_tick kernel/sched/fair.c:5317 [inline]
task_tick_fair+0x341/0x8f0 kernel/sched/fair.c:12392
scheduler_tick+0x1f6/0x6d0 kernel/sched/core.c:5657
update_process_times+0x17f/0x1b0 kernel/time/timer.c:2076
tick_sched_handle kernel/time/tick-sched.c:254 [inline]
tick_sched_timer+0x379/0x550 kernel/time/tick-sched.c:1492
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x562/0xd10 kernel/time/hrtimer.c:1752
hrtimer_interrupt+0x396/0x980 kernel/time/hrtimer.c:1814
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1063 [inline]
__sysvec_apic_timer_interrupt+0x104/0x390 arch/x86/kernel/apic/apic.c:1080
sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1074
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x29/0x50 kernel/locking/spinlock.c:202
Code: 00 f3 0f 1e fa 53 48 89 fb 48 83 c7 18 48 8b 74 24 08 e8 8a 64 94 f6 48 89 df e8 92 54 95 f6 e8 0d ca bb f6 fb bf 01 00 00 00 e2 5a 87 f6 65 8b 05 d3 a2 2a 75 85 c0 74 02 5b c3 e8 70 70 27
RSP: 0018:ffffc9000b4ffc50 EFLAGS: 00000282
RAX: cfa8c26a9ec61d00 RBX: ffff88808dfdd340 RCX: ffffffff91eef303
RDX: dffffc0000000000 RSI: ffffffff8b0aa4a0 RDI: 0000000000000001
RBP: ffffc9000b4ffd90 R08: ffffffff8e9a322f R09: 1ffffffff1d34645
R10: dffffc0000000000 R11: fffffbfff1d34646 R12: 1ffff11011bfbafb
R13: 000000001c000004 R14: 0000000000000021 R15: ffff88808dfdd7d8
spin_unlock_irq include/linux/spinlock.h:401 [inline]
get_signal+0x155d/0x1840 kernel/signal.c:2895
arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:309
exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:296
do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f16ca87cae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffcfccba948 EFLAGS: 00000246
RAX: 0000000000000001 RBX: 0000000000000000 RCX: 00007f16ca87cae9
RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f16ca99bf88
RBP: 0000000000000048 R08: 00007f16ca99bf8c R09: 00007f16ca99bf8c
R10: 00007f16ca400c68 R11: 0000000000000246 R12: 00007f16ca99bf80
R13: 0000000000001067 R14: 0000000000000000 R15: 00007f16ca99bf80
Allocated by task 2:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4f/0x70 mm/kasan/common.c:52
__kasan_slab_alloc+0x66/0x70 mm/kasan/common.c:328
kasan_slab_alloc include/linux/kasan.h:188 [inline]
slab_post_alloc_hook+0x67/0x3d0 mm/slab.h:762
slab_alloc_node mm/slub.c:3478 [inline]
kmem_cache_alloc_node+0x148/0x330 mm/slub.c:3523
alloc_task_struct_node kernel/fork.c:173 [inline]
dup_task_struct+0x57/0x7d0 kernel/fork.c:1110
copy_process+0x5d1/0x41a0 kernel/fork.c:2327
kernel_clone+0x222/0x840 kernel/fork.c:2909
kernel_thread+0x1bc/0x230 kernel/fork.c:2971
create_kthread kernel/kthread.c:411 [inline]
kthreadd+0x60c/0x810 kernel/kthread.c:746
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
Freed by task 16:
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4f/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x28/0x40 mm/kasan/generic.c:522
____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:164 [inline]
slab_free_hook mm/slub.c:1800 [inline]
slab_free_freelist_hook mm/slub.c:1826 [inline]
slab_free mm/slub.c:3809 [inline]
kmem_cache_free+0x292/0x500 mm/slub.c:3831
put_task_struct include/linux/sched/task.h:136 [inline]
delayed_put_task_struct+0x115/0x2c0 kernel/exit.c:226
rcu_do_batch kernel/rcu/tree.c:2139 [inline]
rcu_core+0xacf/0x1790 kernel/rcu/tree.c:2403
__do_softirq+0x2ab/0x908 kernel/softirq.c:553
Last potentially related work creation:
kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xad/0xc0 mm/kasan/generic.c:492
__call_rcu_common kernel/rcu/tree.c:2653 [inline]
call_rcu+0x167/0xa70 kernel/rcu/tree.c:2767
context_switch kernel/sched/core.c:5385 [inline]
__schedule+0x1974/0x4af0 kernel/sched/core.c:6695
schedule+0xc3/0x180 kernel/sched/core.c:6771
schedule_timeout+0xb0/0x300 kernel/time/timer.c:2143
do_wait_for_common kernel/sched/completion.c:95 [inline]
__wait_for_common kernel/sched/completion.c:116 [inline]
wait_for_common kernel/sched/completion.c:127 [inline]
wait_for_completion+0x354/0x620 kernel/sched/completion.c:148
kthread_stop+0x18e/0x5d0 kernel/kthread.c:709
destroy_workqueue+0x140/0xf20 kernel/workqueue.c:4815
nci_unregister_device+0xb2/0x240 net/nfc/nci/core.c:1301
virtual_ncidev_close+0x59/0x90 drivers/nfc/virtual_ncidev.c:163
__fput+0x3f8/0x910 fs/file_table.c:384
__do_sys_close fs/open.c:1572 [inline]
__se_sys_close+0x15f/0x220 fs/open.c:1557
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Second to last potentially related work creation:
kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45
__kasan_record_aux_stack+0xad/0xc0 mm/kasan/generic.c:492
__call_rcu_common kernel/rcu/tree.c:2653 [inline]
call_rcu+0x167/0xa70 kernel/rcu/tree.c:2767
release_task+0x1656/0x16f0
wait_task_zombie kernel/exit.c:1210 [inline]
wait_consider_task+0x1a68/0x2ec0 kernel/exit.c:1437
do_wait_thread kernel/exit.c:1500 [inline]
do_wait+0x311/0xb00 kernel/exit.c:1617
kernel_wait4+0x2a2/0x3e0 kernel/exit.c:1780
__do_sys_wait4 kernel/exit.c:1808 [inline]
__se_sys_wait4 kernel/exit.c:1804 [inline]
__x64_sys_wait4+0x134/0x1e0 kernel/exit.c:1804
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
The buggy address belongs to the object at ffff8880238a9dc0
which belongs to the cache task_struct of size 7360
The buggy address is located 176 bytes inside of
freed 7360-byte region [ffff8880238a9dc0, ffff8880238aba80)
The buggy address belongs to the physical page:
page:ffffea00008e2a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x238a8
head:ffffea00008e2a00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88802552fd81
anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888140007500 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000040004 00000001ffffffff ffff88802552fd81
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 58, tgid 58 (kworker/u4:4), ts 16912514458, free_ts 0
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1536
prep_new_page mm/page_alloc.c:1543 [inline]
get_page_from_freelist+0x31db/0x3360 mm/page_alloc.c:3170
__alloc_pages+0x255/0x670 mm/page_alloc.c:4426
alloc_slab_page+0x6a/0x160 mm/slub.c:1870
allocate_slab mm/slub.c:2017 [inline]
new_slab+0x84/0x2f0 mm/slub.c:2070
___slab_alloc+0xc85/0x1310 mm/slub.c:3223
__slab_alloc mm/slub.c:3322 [inline]
__slab_alloc_node mm/slub.c:3375 [inline]
slab_alloc_node mm/slub.c:3468 [inline]
kmem_cache_alloc_node+0x1e1/0x330 mm/slub.c:3523
alloc_task_struct_node kernel/fork.c:173 [inline]
dup_task_struct+0x57/0x7d0 kernel/fork.c:1110
copy_process+0x5d1/0x41a0 kernel/fork.c:2327
kernel_clone+0x222/0x840 kernel/fork.c:2909
user_mode_thread+0x132/0x190 kernel/fork.c:2987
call_usermodehelper_exec_work+0x5c/0x220 kernel/umh.c:172
process_one_work kernel/workqueue.c:2630 [inline]
process_scheduled_works+0x90f/0x1400 kernel/workqueue.c:2703
worker_thread+0xa5f/0xff0 kernel/workqueue.c:2784
kthread+0x2d3/0x370 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
page_owner free stack trace missing
Memory state around the buggy address:
ffff8880238a9d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880238a9d80: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
>ffff8880238a9e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880238a9e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880238a9f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 00 f3 add %dh,%bl
2: 0f 1e fa nop %edx
5: 53 push %rbx
6: 48 89 fb mov %rdi,%rbx
9: 48 83 c7 18 add $0x18,%rdi
d: 48 8b 74 24 08 mov 0x8(%rsp),%rsi
12: e8 8a 64 94 f6 call 0xf69464a1
17: 48 89 df mov %rbx,%rdi
1a: e8 92 54 95 f6 call 0xf69554b1
1f: e8 0d ca bb f6 call 0xf6bbca31
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 e2 5a 87 f6 call 0xf6875b11 <-- trapping instruction
2f: 65 8b 05 d3 a2 2a 75 mov %gs:0x752aa2d3(%rip),%eax # 0x752aa309
36: 85 c0 test %eax,%eax
38: 74 02 je 0x3c
3a: 5b pop %rbx
3b: c3 ret
3c: e8 .byte 0xe8
3d: 70 70 jo 0xaf
3f: 27 (bad)