================================================================== BUG: KASAN: stack-out-of-bounds in profile_pc+0xa4/0xe0 arch/x86/kernel/time.c:42 Read of size 8 at addr ffffc900027ff920 by task syz-executor131/3601 CPU: 1 PID: 3601 Comm: syz-executor131 Not tainted 5.17.0-rc7-syzkaller-00020-gea4424be1688 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1dc/0x2d8 lib/dump_stack.c:106 print_address_description+0x65/0x3a0 mm/kasan/report.c:255 __kasan_report mm/kasan/report.c:442 [inline] kasan_report+0x19a/0x1f0 mm/kasan/report.c:459 profile_pc+0xa4/0xe0 arch/x86/kernel/time.c:42 profile_tick+0xcd/0x120 kernel/profile.c:336 tick_sched_handle kernel/time/tick-sched.c:227 [inline] tick_sched_timer+0x287/0x420 kernel/time/tick-sched.c:1428 __run_hrtimer kernel/time/hrtimer.c:1685 [inline] __hrtimer_run_queues+0x4cb/0xa60 kernel/time/hrtimer.c:1749 hrtimer_interrupt+0x3b3/0x1040 kernel/time/hrtimer.c:1811 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1086 [inline] __sysvec_apic_timer_interrupt+0xf9/0x270 arch/x86/kernel/apic/apic.c:1103 sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xd4/0x130 kernel/locking/spinlock.c:194 Code: 9c 8f 44 24 20 42 80 3c 23 00 74 08 4c 89 f7 e8 c2 49 b4 f7 f6 44 24 21 02 75 4e 41 f7 c7 00 02 00 00 74 01 fb bf 01 00 00 00 27 f1 3c f7 65 8b 05 88 67 e4 75 85 c0 74 3f 48 c7 04 24 0e 36 RSP: 0018:ffffc900027ff920 EFLAGS: 00000206 RAX: 2ecae1e654c9e300 RBX: 1ffff920004fff28 RCX: ffffffff81674de1 RDX: dffffc0000000000 RSI: 0000000000000002 RDI: 0000000000000001 RBP: ffffc900027ff9b0 R08: dffffc0000000000 R09: fffffbfff1ffbbc5 R10: fffffbfff1ffbbc5 R11: 0000000000000000 R12: dffffc0000000000 R13: 1ffff920004fff24 R14: ffffc900027ff940 R15: 0000000000000246 try_to_wake_up+0x6f8/0xc70 kernel/sched/core.c:4135 __cpuhp_kick_ap kernel/cpu.c:539 [inline] cpuhp_invoke_ap_callback kernel/cpu.c:844 [inline] cpuhp_issue_call+0x312/0x7a0 kernel/cpu.c:1915 __cpuhp_setup_state_cpuslocked+0x431/0x800 kernel/cpu.c:2063 __cpuhp_setup_state+0x3b/0x50 kernel/cpu.c:2092 cpuhp_setup_state include/linux/cpuhotplug.h:280 [inline] create_proc_profile+0x8b/0x110 kernel/profile.c:471 profiling_store+0x7c/0xc0 kernel/ksysfs.c:83 kernfs_fop_write_iter+0x3b6/0x510 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2074 [inline] new_sync_write fs/read_write.c:503 [inline] vfs_write+0xb11/0xe90 fs/read_write.c:590 ksys_write+0x18f/0x2c0 fs/read_write.c:643 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fbdfab91f99 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 41 15 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 c0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fff0f98ab38 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000031 RCX: 00007fbdfab91f99 RDX: 00000000ffffff82 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00007fff0f98abe0 R08: 00007fff00000003 R09: 00007fff00000003 R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000047 R13: 00007fff0f98ab7a R14: 00007fbdfac0d4a0 R15: 00007fff0f98abb0 addr ffffc900027ff920 is located in stack of task syz-executor131/3601 at offset 0 in frame: _raw_spin_unlock_irqrestore+0x0/0x130 kernel/locking/spinlock.c:187 this frame has 1 object: [32, 40) 'flags.i.i.i.i' Memory state around the buggy address: ffffc900027ff800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900027ff880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc900027ff900: 00 00 00 00 f1 f1 f1 f1 00 f3 f3 f3 00 00 00 00 ^ ffffc900027ff980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900027ffa00: f1 f1 f1 f1 00 00 f3 f3 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 9c pushfq 1: 8f 44 24 20 popq 0x20(%rsp) 5: 42 80 3c 23 00 cmpb $0x0,(%rbx,%r12,1) a: 74 08 je 0x14 c: 4c 89 f7 mov %r14,%rdi f: e8 c2 49 b4 f7 callq 0xf7b449d6 14: f6 44 24 21 02 testb $0x2,0x21(%rsp) 19: 75 4e jne 0x69 1b: 41 f7 c7 00 02 00 00 test $0x200,%r15d 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 27 f1 3c f7 callq 0xf73cf156 <-- trapping instruction 2f: 65 8b 05 88 67 e4 75 mov %gs:0x75e46788(%rip),%eax # 0x75e467be 36: 85 c0 test %eax,%eax 38: 74 3f je 0x79 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss