================================================================== BUG: KASAN: stack-out-of-bounds in profile_pc+0xa4/0xe0 arch/x86/kernel/time.c:42 Read of size 8 at addr ffff8881dd267e00 by task udevd/352 CPU: 0 PID: 352 Comm: udevd Not tainted 5.4.276-syzkaller-00021-g58de09405d1e #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 3c 08 43 fd 48 83 3d 9c 25 9a 01 00 74 76 44 89 fe 4c 89 ef e8 c7 ea 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 6a RSP: 0018:ffff8881dd267e00 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000004 RBX: 1ffff1103ba4cfc0 RCX: ffffffff84512a00 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 0000000000000000 RBP: ffff8881dd267ea0 R08: ffffffff81006fef R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: dffffc0000000000 R13: ffff8881e015d400 R14: 1ffff1103ba4cfc4 R15: ffff8881dd267e20 spin_lock include/linux/spinlock.h:338 [inline] __close_fd+0x32/0x2c0 fs/file.c:626 __do_sys_close fs/open.c:1219 [inline] __se_sys_close fs/open.c:1217 [inline] __x64_sys_close+0x61/0xb0 fs/open.c:1217 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 RIP: 0033:0x7fae606530a8 Code: 48 8b 05 83 9d 0d 00 64 c7 00 16 00 00 00 83 c8 ff 48 83 c4 20 5b c3 64 8b 04 25 18 00 00 00 85 c0 75 20 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 5b 48 8b 15 51 9d 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffe8f439788 EFLAGS: 00000246 ORIG_RAX: 0000000000000003 RAX: ffffffffffffffda RBX: 00007fae60527ae0 RCX: 00007fae606530a8 RDX: 00007fae6072db00 RSI: 000055619a1d6010 RDI: 0000000000000009 RBP: 000055619a209a70 R08: 0000000000000007 R09: 35edcf9c74e14170 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002 R13: 000055619a1e2e90 R14: 0000000000000000 R15: 0000000000000001 The buggy address belongs to the page: page:ffffea00077499c0 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0x8000000000000000() raw: 8000000000000000 ffffea00077499c8 ffffea00077499c8 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: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_clone kernel/fork.c:2557 [inline] __se_sys_clone kernel/fork.c:2538 [inline] __x64_sys_clone+0x26b/0x2c0 kernel/fork.c:2538 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 page_owner free stack trace missing addr ffff8881dd267e00 is located in stack of task udevd/352 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: ffff8881dd267d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881dd267d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8881dd267e00: f1 f1 f1 f1 04 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffff8881dd267e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881dd267f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- 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 3c 08 43 fd call 0xfd43084d 11: 48 83 3d 9c 25 9a 01 cmpq $0x0,0x19a259c(%rip) # 0x19a25b5 18: 00 19: 74 76 je 0x91 1b: 44 89 fe mov %r15d,%esi 1e: 4c 89 ef mov %r13,%rdi 21: e8 c7 ea fa fc call 0xfcfaeaed 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: 6a .byte 0x6a