================================================================== BUG: KASAN: stack-out-of-bounds in profile_pc+0xa4/0xe0 arch/x86/kernel/time.c:42 Read of size 8 at addr ffff8881e0656f40 by task sshd/351 CPU: 0 PID: 351 Comm: sshd Not tainted 5.4.242-syzkaller-00020-g6d5c2c1877e5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1d8/0x241 lib/dump_stack.c:118 print_address_description+0x8c/0x600 mm/kasan/report.c:384 __kasan_report+0xf3/0x120 mm/kasan/report.c:516 kasan_report+0x30/0x60 mm/kasan/common.c:653 profile_pc+0xa4/0xe0 arch/x86/kernel/time.c:42 profile_tick+0xb9/0x100 kernel/profile.c:416 tick_sched_handle kernel/time/tick-sched.c:172 [inline] tick_sched_timer+0x237/0x3e0 kernel/time/tick-sched.c:1296 __run_hrtimer kernel/time/hrtimer.c:1581 [inline] __hrtimer_run_queues+0x3e9/0xb90 kernel/time/hrtimer.c:1643 hrtimer_interrupt+0x38a/0x890 kernel/time/hrtimer.c:1705 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1123 [inline] smp_apic_timer_interrupt+0x110/0x460 arch/x86/kernel/apic/apic.c:1148 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:834 The buggy address belongs to the page: page:ffffea0007819580 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 0000000000000000 ffffea0007819588 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x400dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO) set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook mm/page_alloc.c:2165 [inline] prep_new_page+0x18f/0x370 mm/page_alloc.c:2171 get_page_from_freelist+0x2d13/0x2d90 mm/page_alloc.c:3794 __alloc_pages_nodemask+0x393/0x840 mm/page_alloc.c:4891 __alloc_pages include/linux/gfp.h:503 [inline] __alloc_pages_node include/linux/gfp.h:516 [inline] alloc_pages_node include/linux/gfp.h:530 [inline] alloc_thread_stack_node kernel/fork.c:259 [inline] dup_task_struct+0x85/0x600 kernel/fork.c:878 copy_process+0x56d/0x3230 kernel/fork.c:1881 _do_fork+0x197/0x900 kernel/fork.c:2396 __do_sys_clone kernel/fork.c:2554 [inline] __se_sys_clone kernel/fork.c:2535 [inline] __x64_sys_clone+0x26b/0x2c0 kernel/fork.c:2535 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1176 [inline] __free_pages_ok+0x847/0x950 mm/page_alloc.c:1438 put_page include/linux/mm.h:1151 [inline] __skb_frag_unref include/linux/skbuff.h:3046 [inline] skb_release_data+0x210/0x640 net/core/skbuff.c:615 skb_release_all net/core/skbuff.c:675 [inline] __kfree_skb+0x4c/0x60 net/core/skbuff.c:689 sk_eat_skb include/net/sock.h:2530 [inline] tcp_recvmsg+0x174c/0x35b0 net/ipv4/tcp.c:2180 inet_recvmsg+0x158/0x510 net/ipv4/af_inet.c:842 sock_recvmsg_nosec net/socket.c:872 [inline] sock_recvmsg net/socket.c:890 [inline] sock_read_iter+0x34e/0x430 net/socket.c:968 call_read_iter include/linux/fs.h:1975 [inline] new_sync_read fs/read_write.c:414 [inline] __vfs_read+0x5cd/0x730 fs/read_write.c:427 vfs_read+0x148/0x360 fs/read_write.c:461 ksys_read+0x199/0x2c0 fs/read_write.c:587 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 addr ffff8881e0656f40 is located in stack of task sshd/351 at offset 0 in frame: _raw_spin_trylock+0x0/0x1a0 this frame has 1 object: [32, 36) 'val.i.i.i' Memory state around the buggy address: ffff8881e0656e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881e0656e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881e0656f00: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f3 f3 f3 ^ ffff8881e0656f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881e0657000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================