================================================================== BUG: KASAN: stack-out-of-bounds in profile_pc+0x11a/0x130 Read of size 8 at addr ffff88800ef67910 by task sshd/233 CPU: 1 PID: 233 Comm: sshd Not tainted 6.4.0-rc5-next-20230609 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 Call Trace: dump_stack_lvl+0x91/0xf0 print_report+0xcc/0x620 kasan_report+0xc0/0xf0 profile_pc+0x11a/0x130 profile_tick+0xa8/0xf0 tick_sched_timer+0xe6/0x110 __hrtimer_run_queues+0x17f/0xb60 hrtimer_interrupt+0x2ef/0x750 __sysvec_apic_timer_interrupt+0xff/0x380 sysvec_apic_timer_interrupt+0x69/0x90 asm_sysvec_apic_timer_interrupt+0x1a/0x20 RIP: 0010:queued_spin_lock_slowpath+0x128/0xb20 Code: 00 00 00 65 48 2b 04 25 28 00 00 00 0f 85 5c 09 00 00 48 81 c4 88 00 00 00 5b 5d 41 5c 41 5d 41 5e 41 5f e9 7a 21 00 00 f3 90 71 ff ff ff 44 8b 74 24 48 41 81 fe 00 01 00 00 0f 84 e4 00 00 RSP: 0018:ffff88800ef67908 EFLAGS: 00000202 RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffffff8452690b RDX: ffffed1001deb314 RSI: 0000000000000004 RDI: ffff88800ef59898 RBP: ffff88800ef59898 R08: 0000000000000000 R09: ffffed1001deb313 R10: ffff88800ef5989b R11: 0000000000000001 R12: 0000000000000003 R13: ffffed1001deb313 R14: 0000000000000001 R15: 1ffff11001decf22 do_raw_spin_lock+0x1e0/0x270 lock_sock_nested+0x5f/0xf0 tcp_recvmsg+0xf8/0x640 inet_recvmsg+0x12b/0x6c0 sock_recvmsg+0x16c/0x1d0 sock_read_iter+0x2c7/0x3c0 vfs_read+0x788/0x8b0 ksys_read+0x1eb/0x250 do_syscall_64+0x3f/0x90 entry_SYSCALL_64_after_hwframe+0x6e/0xd8 RIP: 0033:0x7f3f72486e8e Code: c0 e9 b6 fe ff ff 50 48 8d 3d 6e 18 0a 00 e8 b9 e7 01 00 66 0f 1f 84 00 00 00 00 00 64 8b 04 25 18 00 00 00 85 c0 75 14 0f 05 <48> 3d 00 f0 ff ff 77 5a c3 66 0f 1f 84 00 00 00 00 00 48 83 ec 28 RSP: 002b:00007fff4ea6cf38 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007fff4ea70fcf RCX: 00007f3f72486e8e RDX: 0000000000004000 RSI: 00007fff4ea6cf40 RDI: 0000000000000004 RBP: 0000000000000004 R08: 00000000000008a3 R09: 00007fff4ead9080 R10: 00007fff4ead90f0 R11: 0000000000000246 R12: 000055668a598ec0 R13: 00007fff4ea6cf40 R14: 0000000000000004 R15: 000055668a320a80 The buggy address belongs to stack of task sshd/233 and is located at offset 0 in frame: queued_spin_lock_slowpath+0x0/0xb20 This frame has 2 objects: [48, 52) 'val' [64, 68) 'val' The buggy address belongs to the physical page: page:000000009fe63798 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xef67 flags: 0x100000000000000(node=0|zone=1) page_type: 0xffffffff() raw: 0100000000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88800ef67800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88800ef67880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88800ef67900: 00 00 f1 f1 f1 f1 f1 f1 04 f2 04 f3 f3 f3 00 00 ^ ffff88800ef67980: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f3 ffff88800ef67a00: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ---------------- Code disassembly (best guess): 0: 00 00 add %al,(%rax) 2: 00 65 48 add %ah,0x48(%rbp) 5: 2b 04 25 28 00 00 00 sub 0x28,%eax c: 0f 85 5c 09 00 00 jne 0x96e 12: 48 81 c4 88 00 00 00 add $0x88,%rsp 19: 5b pop %rbx 1a: 5d pop %rbp 1b: 41 5c pop %r12 1d: 41 5d pop %r13 1f: 41 5e pop %r14 21: 41 5f pop %r15 23: e9 7a 21 00 00 jmpq 0x21a2 28: f3 90 pause * 2a: e9 71 ff ff ff jmpq 0xffffffa0 <-- trapping instruction 2f: 44 8b 74 24 48 mov 0x48(%rsp),%r14d 34: 41 81 fe 00 01 00 00 cmp $0x100,%r14d 3b: 0f .byte 0xf 3c: 84 e4 test %ah,%ah