==================================================================
BUG: KASAN: stack-out-of-bounds in profile_pc+0x179/0x190 arch/x86/kernel/time.c:44
Read of size 8 at addr ffffc90003657bb0 by task syz-executor.3/5187
CPU: 2 PID: 5187 Comm: syz-executor.3 Not tainted 6.7.0-rc6-syzkaller-00022-g55cb5f43689d #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:364 [inline]
print_report+0xc4/0x620 mm/kasan/report.c:475
kasan_report+0xda/0x110 mm/kasan/report.c:588
profile_pc+0x179/0x190 arch/x86/kernel/time.c:44
profile_tick+0xcd/0x130 kernel/profile.c:339
tick_nohz_highres_handler+0xe9/0x110 kernel/time/tick-sched.c:1516
__run_hrtimer kernel/time/hrtimer.c:1688 [inline]
__hrtimer_run_queues+0x647/0xc20 kernel/time/hrtimer.c:1752
hrtimer_interrupt+0x31b/0x800 kernel/time/hrtimer.c:1814
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1065 [inline]
__sysvec_apic_timer_interrupt+0x105/0x400 arch/x86/kernel/apic/apic.c:1082
sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1076
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:queued_read_lock_slowpath+0x131/0x2ad kernel/locking/qrwlock.c:51
Code: 85 41 01 00 00 8b 03 84 c0 74 36 48 b8 00 00 00 00 00 fc ff df 49 89 de 48 89 dd 49 c1 ee 03 83 e5 07 49 01 c6 83 c5 03 f3 90 <41> 0f b6 06 40 38 c5 7c 08 84 c0 0f 85 1b 01 00 00 8b 03 84 c0 75
RSP: 0018:ffffc90003657ba8 EFLAGS: 00000286
RAX: 00000000000002ff RBX: ffffffff8cc0a080 RCX: ffffffff8a82d11b
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffffffff8cc0a080
RBP: 0000000000000003 R08: 0000000000000001 R09: fffffbfff1981410
R10: ffffffff8cc0a083 R11: 0000000000000000 R12: 1ffff920006caf76
R13: ffffffff8cc0a084 R14: fffffbfff1981410 R15: ffffffff814e3682
__do_wait+0x105/0x890 kernel/exit.c:1582
do_wait+0x212/0x530 kernel/exit.c:1626
kernel_wait4+0x16d/0x280 kernel/exit.c:1785
__do_sys_wait4+0x15b/0x170 kernel/exit.c:1813
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f2980079717
Code: 89 7c 24 10 48 89 4c 24 18 e8 d5 a3 02 00 4c 8b 54 24 18 8b 54 24 14 41 89 c0 48 8b 74 24 08 8b 7c 24 10 b8 3d 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 89 44 24 10 e8 25 a4 02 00 8b 44
RSP: 002b:00007fff1c973010 EFLAGS: 00000293 ORIG_RAX: 000000000000003d
RAX: ffffffffffffffda RBX: 0000000000000321 RCX: 00007f2980079717
RDX: 0000000040000001 RSI: 00007fff1c97309c RDI: 00000000ffffffff
RBP: 00007fff1c97309c R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000032
R13: 000000000000da94 R14: 000000000000da94 R15: 0000000000000000
The buggy address belongs to stack of task syz-executor.3/5187
and is located at offset 0 in frame:
queued_read_lock_slowpath+0x0/0x2ad arch/x86/include/asm/paravirt.h:586
This frame has 1 object:
[32, 36) 'val'
The buggy address belongs to the virtual mapping at
[ffffc90003650000, ffffc90003659000) created by:
kernel_clone+0xfd/0x930 kernel/fork.c:2907
The buggy address belongs to the physical page:
page:ffffea000088e400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x22390
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000000 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 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_ZERO), pid 4888, tgid 4888 (dhcpcd), ts 43622333576, free_ts 41429708152
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1537
prep_new_page mm/page_alloc.c:1544 [inline]
get_page_from_freelist+0xa25/0x36d0 mm/page_alloc.c:3312
__alloc_pages+0x22e/0x2420 mm/page_alloc.c:4568
alloc_pages_mpol+0x258/0x5f0 mm/mempolicy.c:2133
vm_area_alloc_pages mm/vmalloc.c:3063 [inline]
__vmalloc_area_node mm/vmalloc.c:3139 [inline]
__vmalloc_node_range+0xa6e/0x1540 mm/vmalloc.c:3320
alloc_thread_stack_node kernel/fork.c:309 [inline]
dup_task_struct kernel/fork.c:1118 [inline]
copy_process+0x138b/0x73f0 kernel/fork.c:2332
kernel_clone+0xfd/0x930 kernel/fork.c:2907
__do_sys_clone+0xba/0x100 kernel/fork.c:3050
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1137 [inline]
free_unref_page_prepare+0x4fa/0xaa0 mm/page_alloc.c:2347
free_unref_page+0x33/0x3b0 mm/page_alloc.c:2487
__folio_put_small mm/swap.c:106 [inline]
__folio_put+0xc3/0x110 mm/swap.c:129
folio_put include/linux/mm.h:1483 [inline]
put_page include/linux/mm.h:1552 [inline]
anon_pipe_buf_release+0x3fa/0x4b0 fs/pipe.c:138
pipe_buf_release include/linux/pipe_fs_i.h:219 [inline]
pipe_update_tail fs/pipe.c:234 [inline]
pipe_read+0x645/0x1400 fs/pipe.c:354
call_read_iter include/linux/fs.h:2014 [inline]
new_sync_read fs/read_write.c:389 [inline]
vfs_read+0x7c5/0x8f0 fs/read_write.c:470
ksys_read+0x1f0/0x250 fs/read_write.c:613
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b
Memory state around the buggy address:
ffffc90003657a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90003657b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc90003657b80: 00 00 00 00 00 00 f1 f1 f1 f1 04 f3 f3 f3 00 00
^
ffffc90003657c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90003657c80: 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00
==================================================================
----------------
Code disassembly (best guess):
0: 85 41 01 test %eax,0x1(%rcx)
3: 00 00 add %al,(%rax)
5: 8b 03 mov (%rbx),%eax
7: 84 c0 test %al,%al
9: 74 36 je 0x41
b: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
12: fc ff df
15: 49 89 de mov %rbx,%r14
18: 48 89 dd mov %rbx,%rbp
1b: 49 c1 ee 03 shr $0x3,%r14
1f: 83 e5 07 and $0x7,%ebp
22: 49 01 c6 add %rax,%r14
25: 83 c5 03 add $0x3,%ebp
28: f3 90 pause
* 2a: 41 0f b6 06 movzbl (%r14),%eax <-- trapping instruction
2e: 40 38 c5 cmp %al,%bpl
31: 7c 08 jl 0x3b
33: 84 c0 test %al,%al
35: 0f 85 1b 01 00 00 jne 0x156
3b: 8b 03 mov (%rbx),%eax
3d: 84 c0 test %al,%al
3f: 75 .byte 0x75