==================================================================
BUG: KASAN: stack-out-of-bounds in profile_pc+0x186/0x1a0 arch/x86/kernel/time.c:44
Read of size 8 at addr ffffc90003ecfb90 by task syz-executor/5209
CPU: 3 PID: 5209 Comm: syz-executor Not tainted 6.10.0-rc5-syzkaller-00035-gafcd48134c58 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
profile_pc+0x186/0x1a0 arch/x86/kernel/time.c:44
profile_tick+0xd3/0x140 kernel/profile.c:339
tick_sched_handle kernel/time/tick-sched.c:277 [inline]
tick_nohz_handler+0x380/0x530 kernel/time/tick-sched.c:297
__run_hrtimer kernel/time/hrtimer.c:1687 [inline]
__hrtimer_run_queues+0x657/0xcc0 kernel/time/hrtimer.c:1751
hrtimer_interrupt+0x31b/0x800 kernel/time/hrtimer.c:1813
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline]
__sysvec_apic_timer_interrupt+0x10f/0x450 arch/x86/kernel/apic/apic.c:1049
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:queued_read_lock_slowpath+0x135/0x2b1 kernel/locking/qrwlock.c:51
Code: 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 1f 01 00 00 8b 03 84 c0 75 e7 48 c7 c0
RSP: 0018:ffffc90003ecfb88 EFLAGS: 00000286
RAX: 0000000000000000 RBX: ffffffff8d80a080 RCX: ffffffff8adfd30b
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffffffff8d80a080
RBP: 0000000000000003 R08: 0000000000000001 R09: fffffbfff1b01410
R10: ffffffff8d80a083 R11: 0000000000000000 R12: 1ffff920007d9f72
R13: ffffffff8d80a084 R14: fffffbfff1b01410 R15: ffffffff8152a979
__do_wait+0x105/0x890 kernel/exit.c:1583
do_wait+0x219/0x570 kernel/exit.c:1627
kernel_wait4+0x16c/0x280 kernel/exit.c:1786
__do_compat_sys_wait4+0x159/0x170 kernel/exit.c:1844
do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline]
__do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:386
do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:411
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
RIP: 0023:0xf73eb579
Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000ffc52010 EFLAGS: 00000246 ORIG_RAX: 0000000000000072
RAX: ffffffffffffffda RBX: 00000000ffffffff RCX: 00000000ffc52130
RDX: 0000000040000001 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00000000ffc52130 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
The buggy address belongs to stack of task syz-executor/5209
and is located at offset 0 in frame:
queued_read_lock_slowpath+0x0/0x2b1
This frame has 1 object:
[32, 36) 'val'
The buggy address belongs to the virtual mapping at
[ffffc90003ec8000, ffffc90003ed1000) created by:
kernel_clone+0xfd/0x980 kernel/fork.c:2797
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x29f4d
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
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 4922, tgid 4922 (dhcpcd), ts 48026638457, free_ts 47718541618
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1473
prep_new_page mm/page_alloc.c:1481 [inline]
get_page_from_freelist+0x1353/0x2e50 mm/page_alloc.c:3425
__alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4683
alloc_pages_mpol_noprof+0x275/0x610 mm/mempolicy.c:2265
vm_area_alloc_pages mm/vmalloc.c:3575 [inline]
__vmalloc_area_node mm/vmalloc.c:3651 [inline]
__vmalloc_node_range_noprof+0xa6a/0x1520 mm/vmalloc.c:3832
alloc_thread_stack_node kernel/fork.c:309 [inline]
dup_task_struct kernel/fork.c:1115 [inline]
copy_process+0x29f5/0x6f50 kernel/fork.c:2220
kernel_clone+0xfd/0x980 kernel/fork.c:2797
__do_sys_clone+0xba/0x100 kernel/fork.c:2940
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 0 tgid 0 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1093 [inline]
free_unref_page+0x64a/0xe40 mm/page_alloc.c:2588
__folio_put+0x239/0x360 mm/swap.c:129
folio_put include/linux/mm.h:1513 [inline]
free_page_and_swap_cache+0x249/0x2c0 mm/swap_state.c:305
__tlb_remove_table arch/x86/include/asm/tlb.h:34 [inline]
__tlb_remove_table_free mm/mmu_gather.c:227 [inline]
tlb_remove_table_rcu+0x89/0xe0 mm/mmu_gather.c:282
rcu_do_batch kernel/rcu/tree.c:2535 [inline]
rcu_core+0x828/0x16b0 kernel/rcu/tree.c:2809
handle_softirqs+0x216/0x8f0 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu kernel/softirq.c:637 [inline]
irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
Memory state around the buggy address:
ffffc90003ecfa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90003ecfb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc90003ecfb80: 00 00 f1 f1 f1 f1 04 f3 f3 f3 00 00 00 00 00 00
^
ffffc90003ecfc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90003ecfc80: 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00
==================================================================
----------------
Code disassembly (best guess):
0: 00 8b 03 84 c0 74 add %cl,0x74c08403(%rbx)
6: 36 48 b8 00 00 00 00 ss movabs $0xdffffc0000000000,%rax
d: 00 fc ff df
11: 49 89 de mov %rbx,%r14
14: 48 89 dd mov %rbx,%rbp
17: 49 c1 ee 03 shr $0x3,%r14
1b: 83 e5 07 and $0x7,%ebp
1e: 49 01 c6 add %rax,%r14
21: 83 c5 03 add $0x3,%ebp
24: f3 90 pause
26: 41 0f b6 06 movzbl (%r14),%eax
* 2a: 40 38 c5 cmp %al,%bpl <-- trapping instruction
2d: 7c 08 jl 0x37
2f: 84 c0 test %al,%al
31: 0f 85 1f 01 00 00 jne 0x156
37: 8b 03 mov (%rbx),%eax
39: 84 c0 test %al,%al
3b: 75 e7 jne 0x24
3d: 48 rex.W
3e: c7 .byte 0xc7
3f: c0 .byte 0xc0