RBP: ffffc9000475f918 R08: ffffffff94f25267 R09: 1ffffffff29e4a4c
R10: dffffc0000000000 R11: fffffbfff29e4a4d R12: ffffffff94f22ec8
==================================================================
BUG: KASAN: stack-out-of-bounds in __show_regs+0x23e/0x610 arch/x86/kernel/process_64.c:91
Read of size 8 at addr ffffc9000475f798 by task syz.0.482/7737
CPU: 1 UID: 0 PID: 7737 Comm: syz.0.482 Not tainted 6.11.0-rc1-next-20240729-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:377 [inline]
print_report+0x169/0x550 mm/kasan/report.c:488
kasan_report+0x143/0x180 mm/kasan/report.c:601
__show_regs+0x23e/0x610 arch/x86/kernel/process_64.c:91
show_trace_log_lvl+0x3d4/0x520 arch/x86/kernel/dumpstack.c:301
sched_show_task+0x506/0x6d0 kernel/sched/core.c:7512
report_rtnl_holders+0x327/0x400 net/core/rtnetlink.c:110
call_timer_fn+0x18e/0x650 kernel/time/timer.c:1792
expire_timers kernel/time/timer.c:1843 [inline]
__run_timers kernel/time/timer.c:2417 [inline]
__run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2428
run_timer_base kernel/time/timer.c:2437 [inline]
run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2447
handle_softirqs+0x2c4/0x970 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637
irq_exit_rcu+0x9/0x30 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:kernel_text_address+0x5/0xe0 kernel/extable.c:95
Code: c2 20 ca 08 c2 0f b6 c2 5b c3 cc cc cc cc 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 66 0f 1f 00 55 <41> 56 53 48 89 fb 48 c7 c0 00 00 00 81 bd 01 00 00 00 48 39 c7 72
RSP: 0000:ffffc9000446e4d8 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffffff81ed9806 RCX: ffff88802ae6bc00
RDX: ffff88802ae6bc00 RSI: 0000000000000001 RDI: ffffffff81ed9806
RBP: 0000000000000001 R08: ffffffff814105c7 R09: ffffffff814120bf
R10: 0000000000000003 R11: ffff88802ae6bc00 R12: ffff88802ae6bc00
R13: ffffffff817f7070 R14: dffffc0000000000 R15: 1ffff9200088dcad
__kernel_text_address+0xd/0x40 kernel/extable.c:79
unwind_get_return_address+0x5d/0xc0 arch/x86/kernel/unwind_orc.c:369
arch_stack_walk+0x125/0x1b0 arch/x86/kernel/stacktrace.c:26
stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122
save_stack+0xfb/0x1f0 mm/page_owner.c:156
__set_page_owner+0x92/0x800 mm/page_owner.c:320
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1493
prep_new_page mm/page_alloc.c:1501 [inline]
get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3442
__alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4700
alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2263
folio_alloc_mpol_noprof+0x36/0x50 mm/mempolicy.c:2281
shmem_alloc_folio mm/shmem.c:1726 [inline]
shmem_alloc_and_add_folio+0x2ce/0x14e0 mm/shmem.c:1786
shmem_get_folio_gfp+0x8dc/0x2370 mm/shmem.c:2192
shmem_get_folio mm/shmem.c:2297 [inline]
shmem_write_begin+0x170/0x4d0 mm/shmem.c:2902
generic_perform_write+0x399/0x840 mm/filemap.c:4019
shmem_file_write_iter+0xfc/0x120 mm/shmem.c:3078
__kernel_write_iter+0x40d/0x900 fs/read_write.c:523
dump_emit_page fs/coredump.c:893 [inline]
dump_user_range+0x4e0/0x950 fs/coredump.c:954
elf_core_dump+0x3de6/0x4720 fs/binfmt_elf.c:2116
do_coredump+0x1b04/0x2a30 fs/coredump.c:767
get_signal+0x13fa/0x1740 kernel/signal.c:2902
arch_do_signal_or_restart+0x96/0x830 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
irqentry_exit_to_user_mode+0x79/0x280 kernel/entry/common.c:231
exc_page_fault+0x590/0x8c0 arch/x86/mm/fault.c:1542
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623
RIP: 0033:0x7f5cdf63a307
Code: 88 15 ea b3 df 00 88 05 e7 b3 df 00 c3 50 48 8d 35 f6 b5 1a 00 48 8d 3d fc b5 1a 00 31 c0 e8 a0 f9 ff ff 53 89 fb 48 83 ec 10 <64> 8b 04 25 94 ff ff ff 85 c0 74 2a 89 fe 31 c0 bf 3c 00 00 00 e8
RSP: 002b:00007f5cdf1e0060 EFLAGS: 00010206
RAX: 0000000000000000 RBX: 000000000000000b RCX: 00007f5cdf7779f9
RDX: 00007f5cdf1e0080 RSI: 00007f5cdf1e01b0 RDI: 000000000000000b
RBP: 00007f5cdf7e58ee R08: 0000000000000000 R09: 0000000000000058
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007f5cdf906130 R15: 00007ffd3fc2b2d8
The buggy address belongs to the virtual mapping at
[ffffc90004758000, ffffc90004761000) created by:
copy_process+0x5d1/0x3d90 kernel/fork.c:2206
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x20058 pfn:0x2e0ac
memcg:ffff88802c5a0882
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000020058 0000000000000000 00000001ffffffff ffff88802c5a0882
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 7677, tgid 7677 (syz.3.467), ts 289770460163, free_ts 287996121942
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1493
prep_new_page mm/page_alloc.c:1501 [inline]
get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3442
__alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4700
alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2263
vm_area_alloc_pages mm/vmalloc.c:3584 [inline]
__vmalloc_area_node mm/vmalloc.c:3660 [inline]
__vmalloc_node_range_noprof+0x971/0x1460 mm/vmalloc.c:3841
alloc_thread_stack_node kernel/fork.c:314 [inline]
dup_task_struct+0x444/0x8c0 kernel/fork.c:1115
copy_process+0x5d1/0x3d90 kernel/fork.c:2206
kernel_clone+0x226/0x8f0 kernel/fork.c:2788
__do_sys_clone3 kernel/fork.c:3092 [inline]
__se_sys_clone3+0x2cb/0x350 kernel/fork.c:3071
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5280 tgid 5280 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1094 [inline]
free_unref_page+0xd22/0xea0 mm/page_alloc.c:2612
__folio_put+0x2c8/0x440 mm/swap.c:128
unpin_user_pages_dirty_lock+0x30c/0x540 mm/gup.c:325
xdp_umem_unpin_pages net/xdp/xdp_umem.c:26 [inline]
xdp_umem_release+0xda/0x220 net/xdp/xdp_umem.c:61
xp_release_deferred+0xfc/0x180 net/xdp/xsk_buff_pool.c:289
process_one_work kernel/workqueue.c:3231 [inline]
process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312
worker_thread+0x86d/0xd40 kernel/workqueue.c:3390
kthread+0x2f0/0x390 kernel/kthread.c:389
ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:144
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Memory state around the buggy address:
ffffc9000475f680: 00 00 00 00 f2 f2 f2 f2 00 00 00 00 00 f3 f3 f3
ffffc9000475f700: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc9000475f780: f1 f1 f1 f1 00 f2 f2 f2 00 f3 f3 f3 00 00 00 00
^
ffffc9000475f800: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
ffffc9000475f880: 00 f2 f2 f2 00 f3 f3 f3 00 00 00 00 00 00 00 00
==================================================================
vkms_vblank_simulate: vblank timer overrun
----------------
Code disassembly (best guess):
0: c2 20 ca ret $0xca20
3: 08 c2 or %al,%dl
5: 0f b6 c2 movzbl %dl,%eax
8: 5b pop %rbx
9: c3 ret
a: cc int3
b: cc int3
c: cc int3
d: cc int3
e: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
15: 90 nop
16: 90 nop
17: 90 nop
18: 90 nop
19: 90 nop
1a: 90 nop
1b: 90 nop
1c: 90 nop
1d: 90 nop
1e: 90 nop
1f: 90 nop
20: 90 nop
21: 90 nop
22: 90 nop
23: 90 nop
24: 90 nop
25: 66 0f 1f 00 nopw (%rax)
29: 55 push %rbp
* 2a: 41 56 push %r14 <-- trapping instruction
2c: 53 push %rbx
2d: 48 89 fb mov %rdi,%rbx
30: 48 c7 c0 00 00 00 81 mov $0xffffffff81000000,%rax
37: bd 01 00 00 00 mov $0x1,%ebp
3c: 48 39 c7 cmp %rax,%rdi
3f: 72 .byte 0x72