==================================================================
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: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+0x8e3/0xa60 kernel/sched/fair.c:3660
Read of size 8 at addr ffff88802bf8bc30 by task syz-executor.5/27232
CPU: 0 PID: 27232 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
__update_min_deadline kernel/sched/fair.c:805 [inline]
min_deadline_update kernel/sched/fair.c:819 [inline]
min_deadline_cb_propagate kernel/sched/fair.c:825 [inline]
reweight_entity+0x8e3/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:__might_resched+0x3b/0x5e0 kernel/sched/core.c:10142
Code: 56 41 55 41 89 f5 41 54 49 89 fc 55 89 d5 53 48 83 ec 50 48 c7 44 24 10 b3 8a b5 41 48 8d 5c 24 10 48 c7 44 24 18 9e 7a 4b 8c <48> c1 eb 03 48 c7 44 24 20 80 7b 5a 81 48 01 d8 c7 00 f1 f1 f1 f1
RSP: 0018:ffffc90015137af0 EFLAGS: 00000286
RAX: dffffc0000000000 RBX: ffffc90015137b00 RCX: ffffc90012533000
RDX: 0000000000000000 RSI: 0000000000000123 RDI: ffffffff8bae1840
RBP: 0000000000000000 R08: 0000000000000004 R09: 000000000007ffff
R10: 0000000000031bdd R11: 1ffffffff1976ca1 R12: ffffffff8bae1840
R13: 0000000000000123 R14: dffffc0000000000 R15: 0000000000031bdc
inet_twsk_purge+0x102/0x900 net/ipv4/inet_timewait_sock.c:291
ops_exit_list+0x125/0x170 net/core/net_namespace.c:175
setup_net+0x64d/0xa40 net/core/net_namespace.c:362
copy_net_ns+0x2fa/0x670 net/core/net_namespace.c:491
create_new_namespaces+0x3ea/0xb10 kernel/nsproxy.c:110
unshare_nsproxy_namespaces+0xc1/0x1f0 kernel/nsproxy.c:228
ksys_unshare+0x3da/0x930 kernel/fork.c:3435
__do_sys_unshare kernel/fork.c:3506 [inline]
__se_sys_unshare kernel/fork.c:3504 [inline]
__x64_sys_unshare+0x31/0x40 kernel/fork.c:3504
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:0x7f45a147cae9
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:00007f45a22980c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000110
RAX: ffffffffffffffda RBX: 00007f45a159bf80 RCX: 00007f45a147cae9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000006c060000
RBP: 00007f45a14c847a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f45a159bf80 R15: 00007fffd7c45598
Allocated by task 4704:
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
context_switch kernel/sched/core.c:5385 [inline]
__schedule+0xee9/0x5a10 kernel/sched/core.c:6695
schedule_idle+0x5b/0x80 kernel/sched/core.c:6799
do_idle+0x288/0x3f0 kernel/sched/idle.c:310
cpu_startup_entry+0x50/0x60 kernel/sched/idle.c:380
start_secondary+0x20e/0x2a0 arch/x86/kernel/smpboot.c:326
secondary_startup_64_no_verify+0x166/0x16b
The buggy address belongs to the object at ffff88802bf8bb80
which belongs to the cache task_struct of size 7360
The buggy address is located 176 bytes inside of
freed 7360-byte region [ffff88802bf8bb80, ffff88802bf8d840)
The buggy address belongs to the physical page:
page:ffffea0000afe200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2bf88
head:ffffea0000afe200 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
memcg:ffff888028749d41
flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000840 ffff888014e43500 dead000000000122 0000000000000000
raw: 0000000000000000 0000000080040004 00000001ffffffff ffff888028749d41
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 4704, tgid 4704 (dhcpcd), ts 1286748563597, free_ts 1285869010846
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_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
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
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_lru+0x221/0x680 mm/slub.c:3509
alloc_inode_sb include/linux/fs.h:2868 [inline]
sock_alloc_inode+0x25/0x1c0 net/socket.c:308
alloc_inode+0x5d/0x220 fs/inode.c:259
new_inode_pseudo+0x16/0x80 fs/inode.c:1004
sock_alloc+0x40/0x270 net/socket.c:634
__sock_create+0xbc/0x800 net/socket.c:1533
sock_create net/socket.c:1620 [inline]
__sys_socket_create net/socket.c:1657 [inline]
__sys_socket+0x14c/0x260 net/socket.c:1708
__do_sys_socket net/socket.c:1722 [inline]
__se_sys_socket net/socket.c:1720 [inline]
__x64_sys_socket+0x72/0xb0 net/socket.c:1720
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:
ffff88802bf8bb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88802bf8bb80: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88802bf8bc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88802bf8bc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88802bf8bd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 56 push %rsi
1: 41 55 push %r13
3: 41 89 f5 mov %esi,%r13d
6: 41 54 push %r12
8: 49 89 fc mov %rdi,%r12
b: 55 push %rbp
c: 89 d5 mov %edx,%ebp
e: 53 push %rbx
f: 48 83 ec 50 sub $0x50,%rsp
13: 48 c7 44 24 10 b3 8a movq $0x41b58ab3,0x10(%rsp)
1a: b5 41
1c: 48 8d 5c 24 10 lea 0x10(%rsp),%rbx
21: 48 c7 44 24 18 9e 7a movq $0xffffffff8c4b7a9e,0x18(%rsp)
28: 4b 8c
* 2a: 48 c1 eb 03 shr $0x3,%rbx <-- trapping instruction
2e: 48 c7 44 24 20 80 7b movq $0xffffffff815a7b80,0x20(%rsp)
35: 5a 81
37: 48 01 d8 add %rbx,%rax
3a: c7 00 f1 f1 f1 f1 movl $0xf1f1f1f1,(%rax)