================================================================== BUG: KASAN: stack-out-of-bounds in profile_pc+0xa4/0xe0 arch/x86/kernel/time.c:42 Read of size 8 at addr ffff8881e339f640 by task syz.2.8/402 CPU: 1 PID: 402 Comm: syz.2.8 Not tainted 5.4.274-syzkaller-00002-g6f97bd951d82 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 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:206 [inline] tick_sched_timer+0x237/0x3c0 kernel/time/tick-sched.c:1342 __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:1122 [inline] smp_apic_timer_interrupt+0x110/0x460 arch/x86/kernel/apic/apic.c:1147 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:834 RIP: 0010:queued_spin_lock include/asm-generic/qspinlock.h:76 [inline] RIP: 0010:do_raw_spin_lock include/linux/spinlock.h:181 [inline] RIP: 0010:__raw_spin_lock include/linux/spinlock_api_smp.h:143 [inline] RIP: 0010:_raw_spin_lock+0x13d/0x1b0 kernel/locking/spinlock.c:151 Code: 3c 20 00 74 0c 48 c7 c7 88 3b eb 85 e8 7c 19 43 fd 48 83 3d cc 33 9a 01 00 74 76 44 89 fe 4c 89 ef e8 17 fc fa fc 66 90 eb 85 <44> 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c 34 ff ff ff 4c 89 ff e8 aa RSP: 0018:ffff8881e339f640 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000004 RBX: 1ffff1103c673ec8 RCX: ffffffff84511c00 RDX: ffffc90001146000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff8881e339f6d0 R08: ffffffff83d0e925 R09: ffffffff820b2c36 R10: ffff8881f0ce9f80 R11: 0000000000000002 R12: dffffc0000000000 R13: ffff8881d76170c0 R14: 1ffff1103c673ecc R15: ffff8881e339f660 spin_lock include/linux/spinlock.h:338 [inline] unix_dgram_sendmsg+0xd81/0x1ff0 net/unix/af_unix.c:1749 sock_sendmsg_nosec net/socket.c:638 [inline] __sock_sendmsg net/socket.c:650 [inline] ____sys_sendmsg+0x5ac/0x8f0 net/socket.c:2306 ___sys_sendmsg net/socket.c:2360 [inline] __sys_sendmmsg+0x3c3/0x700 net/socket.c:2463 __do_sys_sendmmsg net/socket.c:2492 [inline] __se_sys_sendmmsg net/socket.c:2489 [inline] __x64_sys_sendmmsg+0x9c/0xb0 net/socket.c:2489 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7f18aef3bb29 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f18ae1bd048 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f18af0c9fa0 RCX: 00007f18aef3bb29 RDX: 0000000000000651 RSI: 0000000020000000 RDI: 0000000000000004 RBP: 00007f18aefbc756 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f18af0c9fa0 R15: 00007ffe03ffff28 The buggy address belongs to the page: page:ffffea00078ce7c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 0000000000000000 ffffea00078ce7c8 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 0x500dc0(GFP_USER|__GFP_ZERO|__GFP_ACCOUNT) 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:4893 __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:886 copy_process+0x56d/0x3230 kernel/fork.c:1889 _do_fork+0x197/0x900 kernel/fork.c:2399 __do_sys_clone3 kernel/fork.c:2688 [inline] __se_sys_clone3 kernel/fork.c:2675 [inline] __x64_sys_clone3+0x2da/0x300 kernel/fork.c:2675 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:1153 [inline] page_to_skb+0x3fd/0x930 drivers/net/virtio_net.c:453 receive_mergeable drivers/net/virtio_net.c:1001 [inline] receive_buf+0xde0/0x51c0 drivers/net/virtio_net.c:1111 virtnet_receive drivers/net/virtio_net.c:1403 [inline] virtnet_poll+0x5f3/0x1250 drivers/net/virtio_net.c:1512 napi_poll net/core/dev.c:6367 [inline] net_rx_action+0x53f/0x1160 net/core/dev.c:6435 __do_softirq+0x23b/0x6b7 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x195/0x1c0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:538 [inline] do_IRQ+0xd3/0x1e0 arch/x86/kernel/irq.c:263 ret_from_intr+0x0/0x1c mem_cgroup_commit_charge+0xa6/0x1b0 mm/memcontrol.c:6664 shmem_getpage_gfp+0x1642/0x2440 mm/shmem.c:1897 shmem_fault+0x2d1/0x7b0 mm/shmem.c:2081 __do_fault mm/memory.c:3259 [inline] do_read_fault mm/memory.c:3668 [inline] do_fault mm/memory.c:3797 [inline] handle_pte_fault mm/memory.c:4028 [inline] __handle_mm_fault mm/memory.c:4152 [inline] handle_mm_fault+0x344b/0x4990 mm/memory.c:4189 faultin_page mm/gup.c:654 [inline] __get_user_pages+0xc0b/0x13b0 mm/gup.c:874 populate_vma_page_range mm/gup.c:1279 [inline] __mm_populate+0x369/0x510 mm/gup.c:1327 mm_populate include/linux/mm.h:2489 [inline] vm_mmap_pgoff+0x20d/0x260 mm/util.c:533 addr ffff8881e339f640 is located in stack of task syz.2.8/402 at offset 0 in frame: _raw_spin_lock+0x0/0x1b0 this frame has 1 object: [32, 36) 'val.i.i.i' Memory state around the buggy address: ffff8881e339f500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881e339f580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881e339f600: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f3 f3 f3 ^ ffff8881e339f680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881e339f700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== sched: RT throttling activated ---------------- Code disassembly (best guess): 0: 3c 20 cmp $0x20,%al 2: 00 74 0c 48 add %dh,0x48(%rsp,%rcx,1) 6: c7 c7 88 3b eb 85 mov $0x85eb3b88,%edi c: e8 7c 19 43 fd call 0xfd43198d 11: 48 83 3d cc 33 9a 01 cmpq $0x0,0x19a33cc(%rip) # 0x19a33e5 18: 00 19: 74 76 je 0x91 1b: 44 89 fe mov %r15d,%esi 1e: 4c 89 ef mov %r13,%rdi 21: e8 17 fc fa fc call 0xfcfafc3d 26: 66 90 xchg %ax,%ax 28: eb 85 jmp 0xffffffaf * 2a: 44 89 f9 mov %r15d,%ecx <-- trapping instruction 2d: 80 e1 07 and $0x7,%cl 30: 80 c1 03 add $0x3,%cl 33: 38 c1 cmp %al,%cl 35: 0f 8c 34 ff ff ff jl 0xffffff6f 3b: 4c 89 ff mov %r15,%rdi 3e: e8 .byte 0xe8 3f: aa stos %al,%es:(%rdi)