================================================================== BUG: KASAN: stack-out-of-bounds in profile_pc+0x118/0x130 arch/x86/kernel/time.c:44 Read of size 8 at addr ffffc90000137c00 by task syz-executor108/5135 CPU: 1 PID: 5135 Comm: syz-executor108 Not tainted 6.2.0-syzkaller-06695-gd8ca6dbb8de7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x150 lib/dump_stack.c:106 print_address_description.constprop.0+0x28/0x360 mm/kasan/report.c:306 print_report mm/kasan/report.c:417 [inline] kasan_report+0x11c/0x130 mm/kasan/report.c:517 profile_pc+0x118/0x130 arch/x86/kernel/time.c:44 profile_tick+0x108/0x180 kernel/profile.c:339 tick_sched_timer+0xf2/0x120 kernel/time/tick-sched.c:1480 __run_hrtimer kernel/time/hrtimer.c:1685 [inline] __hrtimer_run_queues+0x1c6/0x1010 kernel/time/hrtimer.c:1749 hrtimer_interrupt+0x320/0x7b0 kernel/time/hrtimer.c:1811 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1096 [inline] __sysvec_apic_timer_interrupt+0x180/0x660 arch/x86/kernel/apic/apic.c:1113 sysvec_apic_timer_interrupt+0x92/0xc0 arch/x86/kernel/apic/apic.c:1107 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649 RIP: 0010:queued_read_lock_slowpath+0x134/0x2b0 kernel/locking/qrwlock.c:51 Code: 42 01 00 00 8b 45 00 84 c0 74 36 48 b8 00 00 00 00 00 fc ff df 49 89 ee 48 89 eb 49 c1 ee 03 83 e3 07 49 01 c6 83 c3 03 f3 90 <41> 0f b6 06 38 c3 7c 08 84 c0 0f 85 1b 01 00 00 8b 45 00 84 c0 75 RSP: 0018:ffffc90000137bf8 EFLAGS: 00000286 RAX: 00000000000002ff RBX: 0000000000000003 RCX: ffffffff8a16fa6c RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffffffff8c40a080 RBP: ffffffff8c40a080 R08: 0000000000000001 R09: ffffffff8c40a083 R10: fffffbfff1881410 R11: 0000000000000000 R12: 1ffff92000026f80 R13: ffffffff8c40a084 R14: fffffbfff1881410 R15: 0000000000000000 do_wait+0x2b7/0xd90 kernel/exit.c:1602 kernel_wait4+0x150/0x260 kernel/exit.c:1775 __do_sys_wait4+0x13f/0x150 kernel/exit.c:1803 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f542fac00d6 Code: 0f 1f 40 00 31 c9 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 49 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 11 b8 3d 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 5a c3 90 48 83 ec 28 89 54 24 14 48 89 74 24 RSP: 002b:00007ffefd917338 EFLAGS: 00000246 ORIG_RAX: 000000000000003d RAX: ffffffffffffffda RBX: 000000000019ed18 RCX: 00007f542fac00d6 RDX: 0000000040000001 RSI: 00007ffefd91735c RDI: 00000000ffffffff RBP: 0000000000002f1a R08: 00000000000006a3 R09: 00007ffefd941080 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffefd91735c R13: 00007ffefd917390 R14: 00007ffefd917370 R15: 0000000000011754 The buggy address belongs to stack of task syz-executor108/5135 and is located at offset 0 in frame: queued_read_lock_slowpath+0x0/0x2b0 This frame has 1 object: [32, 36) 'val' The buggy address belongs to the virtual mapping at [ffffc90000130000, ffffc90000139000) created by: kernel_clone+0xeb/0xa10 kernel/fork.c:2687 The buggy address belongs to the physical page: page:ffffea0004ffac00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13feb0 flags: 0x17ff00000000000(node=0|zone=2|lastcpupid=0x7ff) raw: 017ff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x0(), pid 1, tgid 1 (swapper/0), ts 1843324404, free_ts 0 create_dummy_stack mm/page_owner.c:67 [inline] register_early_stack+0x66/0xb0 mm/page_owner.c:83 init_page_owner+0x52/0x730 mm/page_owner.c:93 invoke_init_callbacks mm/page_ext.c:126 [inline] page_ext_init+0x4d6/0x5f0 mm/page_ext.c:518 kernel_init_freeable+0xab8/0xe50 init/main.c:1632 page_owner free stack trace missing Memory state around the buggy address: ffffc90000137b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90000137b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90000137c00: f1 f1 f1 f1 04 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffffc90000137c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 ffffc90000137d00: f1 f1 f1 00 00 00 00 00 00 00 00 00 00 00 f3 f3 ================================================================== ---------------- Code disassembly (best guess): 0: 42 01 00 rex.X add %eax,(%rax) 3: 00 8b 45 00 84 c0 add %cl,-0x3f7bffbb(%rbx) 9: 74 36 je 0x41 b: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 12: fc ff df 15: 49 89 ee mov %rbp,%r14 18: 48 89 eb mov %rbp,%rbx 1b: 49 c1 ee 03 shr $0x3,%r14 1f: 83 e3 07 and $0x7,%ebx 22: 49 01 c6 add %rax,%r14 25: 83 c3 03 add $0x3,%ebx 28: f3 90 pause * 2a: 41 0f b6 06 movzbl (%r14),%eax <-- trapping instruction 2e: 38 c3 cmp %al,%bl 30: 7c 08 jl 0x3a 32: 84 c0 test %al,%al 34: 0f 85 1b 01 00 00 jne 0x155 3a: 8b 45 00 mov 0x0(%rbp),%eax 3d: 84 c0 test %al,%al 3f: 75 .byte 0x75