Hello,
syzbot found the following issue on:
HEAD commit: fda589c28604 Merge patch series "Move duplicated instructi..
git tree: git://
git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git for-next
console output:
https://syzkaller.appspot.com/x/log.txt?x=12962770580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=618b9468db3872f5
dashboard link:
https://syzkaller.appspot.com/bug?extid=3fbbb996519a1dc3aeb3
compiler: riscv64-linux-gnu-gcc (Debian 12.2.0-13) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: riscv64
CC: [
linux-...@vger.kernel.org linux-...@vger.kernel.org]
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image (non-bootable):
https://storage.googleapis.com/syzbot-assets/a741b348759c/non_bootable_disk-fda589c2.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/35e8e9562a4e/vmlinux-fda589c2.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/199a0578d98c/Image-fda589c2.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+3fbbb9...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: out-of-bounds in walk_stackframe+0x3e0/0x44e arch/riscv/kernel/stacktrace.c:67
Read of size 8 at addr ffff8f800cc275a8 by task syz.0.90/4203
CPU: 1 UID: 0 PID: 4203 Comm: syz.0.90 Not tainted 6.16.0-rc1-syzkaller-gfda589c28604 #0 PREEMPT
Hardware name: riscv-virtio,qemu (DT)
Call Trace:
[<ffffffff80078bbe>] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:132
[<ffffffff8000327a>] show_stack+0x30/0x3c arch/riscv/kernel/stacktrace.c:138
[<ffffffff8006103e>] __dump_stack lib/dump_stack.c:94 [inline]
[<ffffffff8006103e>] dump_stack_lvl+0x12e/0x1a6 lib/dump_stack.c:120
[<ffffffff8000ef70>] print_address_description mm/kasan/report.c:408 [inline]
[<ffffffff8000ef70>] print_report+0x28e/0x5fe mm/kasan/report.c:521
[<ffffffff80af393a>] kasan_report+0xf0/0x214 mm/kasan/report.c:634
[<ffffffff80af59d2>] __asan_report_load8_noabort+0x12/0x1a mm/kasan/report_generic.c:381
[<ffffffff8007878e>] walk_stackframe+0x3e0/0x44e arch/riscv/kernel/stacktrace.c:67
[<ffffffff862fce86>] arch_stack_walk+0x1c/0x26 arch/riscv/kernel/stacktrace.c:165
[<ffffffff803d0b74>] stack_trace_save_tsk+0x16c/0x1f6 kernel/stacktrace.c:150
[<ffffffff80e3797c>] proc_pid_stack+0x176/0x27e fs/proc/base.c:492
[<ffffffff80e397ae>] proc_single_show+0xf0/0x20e fs/proc/base.c:812
[<ffffffff80cae616>] seq_read_iter+0x452/0x104a fs/seq_file.c:230
[<ffffffff80caf4ac>] seq_read+0x29e/0x360 fs/seq_file.c:162
[<ffffffff80bf024c>] do_loop_readv_writev fs/read_write.c:847 [inline]
[<ffffffff80bf024c>] do_loop_readv_writev fs/read_write.c:835 [inline]
[<ffffffff80bf024c>] vfs_readv+0x53a/0x742 fs/read_write.c:1020
[<ffffffff80bf0582>] do_readv+0x12e/0x308 fs/read_write.c:1080
[<ffffffff80bf701e>] __do_sys_readv fs/read_write.c:1165 [inline]
[<ffffffff80bf701e>] __se_sys_readv fs/read_write.c:1162 [inline]
[<ffffffff80bf701e>] __riscv_sys_readv+0x6e/0xa0 fs/read_write.c:1162
[<ffffffff800769ae>] syscall_handler+0x94/0x118 arch/riscv/include/asm/syscall.h:112
[<ffffffff862fcc32>] do_trap_ecall_u+0x396/0x530 arch/riscv/kernel/traps.c:341
[<ffffffff863250ca>] handle_exception+0x146/0x152 arch/riscv/kernel/entry.S:197
The buggy address belongs to the virtual mapping at
[ffff8f800cc20000, ffff8f800cc29000) created by:
kernel_clone+0x128/0xc9e kernel/fork.c:2599
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffffaf801d82d780 pfn:0x9d82d
memcg:ffffaf801b1cce02
flags: 0xffe000000000000(node=0|zone=0|lastcpupid=0x7ff)
raw: 0ffe000000000000 0000000000000000 dead000000000122 0000000000000000
raw: ffffaf801d82d780 0000000000000000 00000001ffffffff ffffaf801b1cce02
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_ZERO|__GFP_NOWARN), pid 46, tgid 46 (kworker/u10:2), ts 932766582700, free_ts 924178378700
__set_page_owner+0x94/0x4a8 mm/page_owner.c:329
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0xdc/0x1ba mm/page_alloc.c:1704
prep_new_page mm/page_alloc.c:1712 [inline]
get_page_from_freelist+0x880/0x3660 mm/page_alloc.c:3669
__alloc_frozen_pages_noprof+0x22e/0x2124 mm/page_alloc.c:4959
alloc_pages_mpol+0x1fa/0x5ba mm/mempolicy.c:2419
alloc_frozen_pages_noprof+0x174/0x2f0 mm/mempolicy.c:2490
alloc_pages_noprof+0x20/0x48 mm/mempolicy.c:2510
vm_area_alloc_pages mm/vmalloc.c:3634 [inline]
__vmalloc_area_node mm/vmalloc.c:3712 [inline]
__vmalloc_node_range_noprof+0x624/0x11b0 mm/vmalloc.c:3885
__vmalloc_node_noprof+0x104/0x136 mm/vmalloc.c:3948
alloc_thread_stack_node kernel/fork.c:317 [inline]
dup_task_struct kernel/fork.c:877 [inline]
copy_process+0x32ec/0x716a kernel/fork.c:1999
kernel_clone+0x128/0xc9e kernel/fork.c:2599
user_mode_thread+0xd4/0x110 kernel/fork.c:2677
call_usermodehelper_exec_work kernel/umh.c:171 [inline]
call_usermodehelper_exec_work+0xd4/0x1ac kernel/umh.c:157
process_one_work+0x96a/0x1f32 kernel/workqueue.c:3238
process_scheduled_works kernel/workqueue.c:3321 [inline]
worker_thread+0x5ce/0xde8 kernel/workqueue.c:3402
kthread+0x39c/0x7d4 kernel/kthread.c:464
page last free pid 4141 tgid 4140 stack trace:
__reset_page_owner+0x78/0x1ba mm/page_owner.c:308
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1248 [inline]
__free_frozen_pages+0x998/0x1580 mm/page_alloc.c:2706
___free_pages+0x148/0x1ca mm/page_alloc.c:5061
__free_pages mm/page_alloc.c:5071 [inline]
free_pages.part.0+0x274/0x4d4 mm/page_alloc.c:5088
free_pages+0xe/0x18 mm/page_alloc.c:5085
tlb_batch_list_free mm/mmu_gather.c:159 [inline]
tlb_finish_mmu+0x214/0x7f0 mm/mmu_gather.c:500
exit_mmap+0x39c/0xd00 mm/mmap.c:1297
__mmput+0x108/0x3c0 kernel/fork.c:1121
mmput+0x74/0x88 kernel/fork.c:1144
exit_mm kernel/exit.c:581 [inline]
do_exit+0x7b4/0x28ca kernel/exit.c:943
do_group_exit+0xd4/0x26c kernel/exit.c:1104
get_signal+0x207c/0x22fc kernel/signal.c:3034
arch_do_signal_or_restart+0x68e/0x24c6 arch/riscv/kernel/signal.c:431
exit_to_user_mode_loop+0x90/0x134 kernel/entry/common.c:111
exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
do_trap_ecall_u+0x3f0/0x530 arch/riscv/kernel/traps.c:355
handle_exception+0x146/0x152 arch/riscv/kernel/entry.S:197
Memory state around the buggy address:
ffff8f800cc27480: f1 f1 f1 f1 f1 f1 04 f2 00 00 f2 f2 00 00 00 f3
ffff8f800cc27500: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8f800cc27580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
ffff8f800cc27600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8f800cc27680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup