==================================================================
BUG: KASAN: stack-out-of-bounds in profile_pc+0x186/0x1a0 arch/x86/kernel/time.c:44
Read of size 8 at addr ffffc9000403f888 by task syz.2.544/6698
CPU: 1 PID: 6698 Comm: syz.2.544 Not tainted 6.10.0-rc5-syzkaller-00155-g66e55ff12e73 #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+0x131/0x2b1 kernel/locking/qrwlock.c:51
Code: 85 45 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 1f 01 00 00 8b 03 84 c0 75
RSP: 0000:ffffc9000403f880 EFLAGS: 00000286
RAX: 00000000000002ff RBX: ffff88801eb080b0 RCX: ffffffff8adff3cb
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff88801eb080b0
RBP: 0000000000000003 R08: 0000000000000001 R09: ffffed1003d61016
R10: ffff88801eb080b3 R11: 0000000000000002 R12: 1ffff92000807f11
R13: ffff88801eb080b4 R14: ffffed1003d61016 R15: ffff88801eb08000
start_this_handle+0x249/0x15e0 fs/jbd2/transaction.c:383
jbd2__journal_start+0x394/0x6a0 fs/jbd2/transaction.c:520
__ext4_journal_start_sb+0x358/0x660 fs/ext4/ext4_jbd2.c:112
__ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline]
ext4_dirty_inode+0xa1/0x130 fs/ext4/inode.c:5932
__mark_inode_dirty+0x1f0/0xe70 fs/fs-writeback.c:2486
generic_update_time+0xcf/0xf0 fs/inode.c:1907
inode_update_time fs/inode.c:1920 [inline]
__file_update_time fs/inode.c:2109 [inline]
file_update_time+0x137/0x170 fs/inode.c:2139
ext4_page_mkwrite+0x36e/0x1760 fs/ext4/inode.c:6053
do_page_mkwrite+0x17d/0x390 mm/memory.c:3093
do_shared_fault mm/memory.c:4993 [inline]
do_fault mm/memory.c:5055 [inline]
do_pte_missing mm/memory.c:3897 [inline]
handle_pte_fault mm/memory.c:5381 [inline]
__handle_mm_fault+0x3b99/0x52a0 mm/memory.c:5524
handle_mm_fault+0x476/0xa00 mm/memory.c:5689
do_user_addr_fault+0x426/0xe50 arch/x86/mm/fault.c:1338
handle_page_fault arch/x86/mm/fault.c:1481 [inline]
exc_page_fault+0x5c/0xc0 arch/x86/mm/fault.c:1539
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
RIP: 0023:0xf71ceca7
Code: 00 00 00 e8 5b b2 fe ff 8b 44 24 50 8b 5c 24 50 8b 4c 24 10 83 44 24 20 01 8b 40 1c 83 43 14 08 8d 50 f8 89 53 1c 8b 5c 24 14 <89> 48 f8 89 58 fc e9 de fe ff ff 8d b6 00 00 00 00 8b 44 24 50 89
RSP: 002b:00000000fff19dc0 EFLAGS: 00010202
RAX: 00000000313fd000 RBX: 00000000ffffffff RCX: 000000008614fd6a
RDX: 00000000313fcff8 RSI: 000000008614ff01 RDI: 00000000ffffffff
RBP: 00000000f749f008 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
The buggy address belongs to stack of task syz.2.544/6698
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
[ffffc90004038000, ffffc90004041000) created by:
vhost_task_create+0x1bd/0x2b0 kernel/vhost_task.c:145
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888055c701e0 pfn:0x55c70
memcg:ffff88802665cc82
flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff)
raw: 04fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: ffff888055c701e0 0000000000000000 00000001ffffffff ffff88802665cc82
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 6582, tgid 6572 (syz.0.491), ts 98996560846, free_ts 98892996830
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
vhost_task_create+0x1bd/0x2b0 kernel/vhost_task.c:145
vhost_worker_create+0x152/0x370 drivers/vhost/vhost.c:667
vhost_dev_set_owner+0x5c8/0xa70 drivers/vhost/vhost.c:945
vhost_net_set_owner drivers/vhost/net.c:1657 [inline]
vhost_net_ioctl+0x696/0x16f0 drivers/vhost/net.c:1707
compat_ptr_ioctl+0x71/0xb0 fs/ioctl.c:946
__do_compat_sys_ioctl+0x2c3/0x330 fs/ioctl.c:1007
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
page last free pid 29 tgid 29 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
run_ksoftirqd kernel/softirq.c:928 [inline]
run_ksoftirqd+0x3a/0x60 kernel/softirq.c:920
smpboot_thread_fn+0x661/0xa10 kernel/smpboot.c:164
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Memory state around the buggy address:
ffffc9000403f780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc9000403f800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc9000403f880: 00 f1 f1 f1 f1 04 f3 f3 f3 00 00 00 00 00 00 00
^
ffffc9000403f900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc9000403f980: 00 f1 f1 f1 f1 f1 f1 00 00 00 00 00 f3 f3 f3 f3
==================================================================
----------------
Code disassembly (best guess):
0: 85 45 01 test %eax,0x1(%rbp)
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 1f 01 00 00 jne 0x15a
3b: 8b 03 mov (%rbx),%eax
3d: 84 c0 test %al,%al
3f: 75 .byte 0x75