==================================================================
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 ffff888018ea00b0 by task syz-executor.3/19717
CPU: 0 PID: 19717 Comm: syz-executor.3 Not tainted 6.6.0-rc6-syzkaller-00207-gc8045b4a33a5 #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]
enqueue_task_fair+0x641/0xce0 kernel/sched/fair.c:6556
enqueue_task+0x19d/0x2e0 kernel/sched/core.c:2102
activate_task kernel/sched/core.c:2132 [inline]
ttwu_do_activate+0x1d7/0x7b0 kernel/sched/core.c:3787
ttwu_queue kernel/sched/core.c:4029 [inline]
try_to_wake_up+0x7b5/0x1300 kernel/sched/core.c:4346
hrtimer_wakeup+0x62/0x80 kernel/time/hrtimer.c:1942
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x59f/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:console_flush_all+0x9bf/0xec0 kernel/printk/printk.c:2972
Code: 48 21 c3 0f 85 06 02 00 00 e8 2d 36 1d 00 48 8b 5c 24 28 4d 85 f6 75 07 e8 1e 36 1d 00 eb 06 e8 17 36 1d 00 fb 48 8b 44 24 78 <42> 0f b6 04 28 84 c0 0f 85 53 02 00 00 0f b6 1b 31 ff 89 de e8 88
RSP: 0018:ffffc9000a186ce0 EFLAGS: 00000246
RAX: 1ffff92001430de8 RBX: ffffc9000a186f40 RCX: 0000000000040000
RDX: ffffc9000b278000 RSI: 000000000003ffff RDI: 0000000000040000
RBP: ffffc9000a186e90 R08: ffffffff8170d6f0 R09: 1ffffffff20dd470
R10: dffffc0000000000 R11: fffffbfff20dd471 R12: 0000000000000001
R13: dffffc0000000000 R14: 0000000000000200 R15: ffffffff8da6eab8
console_unlock+0x13b/0x4d0 kernel/printk/printk.c:3035
vprintk_emit+0x508/0x720 kernel/printk/printk.c:2307
_printk+0xd5/0x120 kernel/printk/printk.c:2332
set_capacity_and_notify+0x21c/0x2b0 block/genhd.c:86
loop_set_size+0x44/0xa0 drivers/block/loop.c:237
loop_configure+0xd04/0x1250 drivers/block/loop.c:1100
lo_ioctl+0x8f5/0x2080
blkdev_ioctl+0x5cf/0x730 block/ioctl.c:630
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:871 [inline]
__se_sys_ioctl+0xf8/0x170 fs/ioctl.c:857
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
RIP: 0033:0x7f3bf767c84b
Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00
RSP: 002b:00007f3bf83b7e40 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f3bf767c84b
RDX: 0000000000000003 RSI: 0000000000004c00 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000001119
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003
R13: 00007f3bf83b7f3c R14: 00007f3bf83b7f40 R15: 00007f3beddff000
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 5261:
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
smpboot_thread_fn+0x608/0x9f0 kernel/smpboot.c:160
kthread+0x2d3/0x370 kernel/kthread.c:388
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304
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
context_switch kernel/sched/core.c:5385 [inline]
__schedule+0x1974/0x4af0 kernel/sched/core.c:6695
schedule+0xc3/0x180 kernel/sched/core.c:6771
futex_wait_queue+0x14d/0x1d0 kernel/futex/waitwake.c:355
futex_wait+0x207/0x5c0 kernel/futex/waitwake.c:656
do_futex+0x331/0x530 kernel/futex/syscalls.c:106
__do_sys_futex kernel/futex/syscalls.c:183 [inline]
__se_sys_futex+0x3f8/0x480 kernel/futex/syscalls.c:164
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 ffff888018ea0000
which belongs to the cache task_struct of size 7360
The buggy address is located 176 bytes inside of
freed 7360-byte region [ffff888018ea0000, ffff888018ea1cc0)
The buggy address belongs to the physical page:
page:ffffea000063a800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x18ea0
head:ffffea000063a800 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff88802563d581
flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014a43500 ffffea000074ce00 dead000000000002
raw: 0000000000000000 0000000000040004 00000001ffffffff ffff88802563d581
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 2, tgid 2 (kthreadd), ts 4039010239, 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
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
page_owner free stack trace missing
Memory state around the buggy address:
ffff888018e9ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888018ea0000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888018ea0080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888018ea0100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888018ea0180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 48 21 c3 and %rax,%rbx
3: 0f 85 06 02 00 00 jne 0x20f
9: e8 2d 36 1d 00 call 0x1d363b
e: 48 8b 5c 24 28 mov 0x28(%rsp),%rbx
13: 4d 85 f6 test %r14,%r14
16: 75 07 jne 0x1f
18: e8 1e 36 1d 00 call 0x1d363b
1d: eb 06 jmp 0x25
1f: e8 17 36 1d 00 call 0x1d363b
24: fb sti
25: 48 8b 44 24 78 mov 0x78(%rsp),%rax
* 2a: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax <-- trapping instruction
2f: 84 c0 test %al,%al
31: 0f 85 53 02 00 00 jne 0x28a
37: 0f b6 1b movzbl (%rbx),%ebx
3a: 31 ff xor %edi,%edi
3c: 89 de mov %ebx,%esi
3e: e8 .byte 0xe8
3f: 88 .byte 0x88