Hello, syzbot found the following issue on: HEAD commit: 21f1b85c8912 riscv: mm: Do not call pmd dtor on vmemmap pa.. git tree: git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git fixes console output: https://syzkaller.appspot.com/x/log.txt?x=176939c4580000 kernel config: https://syzkaller.appspot.com/x/.config?x=90afd41d36b4291d dashboard link: https://syzkaller.appspot.com/bug?extid=2886d86a850adcd36196 compiler: riscv64-linux-gnu-gcc (Debian 12.2.0-13) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 userspace arch: riscv64 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1281d6f8580000 Downloadable assets: disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/a741b348759c/non_bootable_disk-21f1b85c.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/69f16f8d759e/vmlinux-21f1b85c.xz kernel image: https://storage.googleapis.com/syzbot-assets/1e170e1b7a02/Image-21f1b85c.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+2886d86a850adcd36196@xxxxxxxxxxxxxxxxxxxxxxxxx ================================================================== BUG: KASAN: out-of-bounds in walk_stackframe+0x3f0/0x452 arch/riscv/kernel/stacktrace.c:66 Read of size 8 at addr ff20000001f17d68 by task syz.3.225/5073 CPU: 0 UID: 0 PID: 5073 Comm: syz.3.225 Not tainted 6.13.0-rc2-syzkaller-g21f1b85c8912 #0 Hardware name: riscv-virtio,qemu (DT) Call Trace: [<ffffffff80071bae>] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:130 [<ffffffff8000325c>] show_stack+0x30/0x3c arch/riscv/kernel/stacktrace.c:136 [<ffffffff8005e1f4>] __dump_stack lib/dump_stack.c:94 [inline] [<ffffffff8005e1f4>] dump_stack_lvl+0x12e/0x1a6 lib/dump_stack.c:120 [<ffffffff8000d250>] print_address_description mm/kasan/report.c:378 [inline] [<ffffffff8000d250>] print_report+0x28e/0x5a8 mm/kasan/report.c:489 [<ffffffff80a1a0fe>] kasan_report+0xec/0x118 mm/kasan/report.c:602 [<ffffffff80a1bf64>] __asan_report_load8_noabort+0x12/0x1a mm/kasan/report_generic.c:381 [<ffffffff8007178a>] walk_stackframe+0x3f0/0x452 arch/riscv/kernel/stacktrace.c:66 [<ffffffff861c20d4>] arch_stack_walk+0x1c/0x24 arch/riscv/kernel/stacktrace.c:163 [<ffffffff803a7e92>] stack_trace_save_tsk+0x16c/0x1f6 kernel/stacktrace.c:150 [<ffffffff80cfbfc2>] proc_pid_stack+0x176/0x27e fs/proc/base.c:492 [<ffffffff80cfd524>] proc_single_show+0xf0/0x20e fs/proc/base.c:812 [<ffffffff80b80784>] traverse.part.0.constprop.0+0x126/0x530 fs/seq_file.c:111 [<ffffffff80b81372>] traverse fs/seq_file.c:98 [inline] [<ffffffff80b81372>] seq_read_iter+0x7e4/0x101e fs/seq_file.c:195 [<ffffffff80b81e4a>] seq_read+0x29e/0x360 fs/seq_file.c:162 [<ffffffff80ac99b6>] do_loop_readv_writev fs/read_write.c:840 [inline] [<ffffffff80ac99b6>] do_loop_readv_writev fs/read_write.c:828 [inline] [<ffffffff80ac99b6>] vfs_readv+0x520/0x70c fs/read_write.c:1013 [<ffffffff80aca05c>] do_preadv+0x1b4/0x250 fs/read_write.c:1125 [<ffffffff80ad0718>] __do_sys_preadv fs/read_write.c:1172 [inline] [<ffffffff80ad0718>] __se_sys_preadv fs/read_write.c:1167 [inline] [<ffffffff80ad0718>] __riscv_sys_preadv+0x88/0xc4 fs/read_write.c:1167 [<ffffffff80070302>] syscall_handler+0x94/0x118 arch/riscv/include/asm/syscall.h:90 [<ffffffff861c1fae>] do_trap_ecall_u+0x1aa/0x216 arch/riscv/kernel/traps.c:331 [<ffffffff861e652a>] _new_vmalloc_restore_context_a0+0xc2/0xce The buggy address belongs to the virtual mapping at [ff20000001f10000, ff20000001f19000) created by: kernel_clone+0x11e/0xc3c kernel/fork.c:2807 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x9d543 memcg:ff6000001926ed82 flags: 0xffe000000000000(node=0|zone=0|lastcpupid=0x7ff) raw: 0ffe000000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ff6000001926ed82 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 5065, tgid 5065 (syz.3.222), ts 1917899182200, free_ts 1915638108000 __set_page_owner+0xa2/0x70c mm/page_owner.c:320 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0xf0/0x1e8 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0xdb2/0x2c12 mm/page_alloc.c:3474 __alloc_pages_noprof+0x1e8/0x1fc0 mm/page_alloc.c:4751 alloc_pages_mpol_noprof+0xf8/0x488 mm/mempolicy.c:2269 alloc_pages_noprof+0x174/0x2f0 mm/mempolicy.c:2348 vm_area_alloc_pages mm/vmalloc.c:3589 [inline] __vmalloc_area_node mm/vmalloc.c:3667 [inline] __vmalloc_node_range_noprof+0x642/0x120c mm/vmalloc.c:3844 alloc_thread_stack_node kernel/fork.c:314 [inline] dup_task_struct kernel/fork.c:1121 [inline] copy_process+0x2c04/0x6c90 kernel/fork.c:2225 kernel_clone+0x11e/0xc3c kernel/fork.c:2807 __do_sys_clone+0xe4/0x118 kernel/fork.c:2950 __se_sys_clone kernel/fork.c:2918 [inline] __riscv_sys_clone+0xa0/0x10e kernel/fork.c:2918 syscall_handler+0x94/0x118 arch/riscv/include/asm/syscall.h:90 do_trap_ecall_u+0x1aa/0x216 arch/riscv/kernel/traps.c:331 _new_vmalloc_restore_context_a0+0xc2/0xce page last free pid 4315 tgid 4315 stack trace: __reset_page_owner+0x8c/0x400 mm/page_owner.c:297 reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0x61e/0x11d6 mm/page_alloc.c:2657 __free_pages+0x13a/0x1ba mm/page_alloc.c:4838 bpf_ringbuf_free kernel/bpf/ringbuf.c:226 [inline] ringbuf_map_free+0xc8/0x134 kernel/bpf/ringbuf.c:235 bpf_map_free kernel/bpf/syscall.c:839 [inline] bpf_map_free_deferred+0x21e/0x46a kernel/bpf/syscall.c:863 process_one_work+0x968/0x1f38 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x5be/0xdc6 kernel/workqueue.c:3391 kthread+0x28c/0x3a4 kernel/kthread.c:389 ret_from_fork+0xe/0x18 arch/riscv/kernel/entry.S:326 Memory state around the buggy address: ff20000001f17c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff20000001f17c80: f1 f1 f1 f1 04 f3 f3 f3 00 00 00 00 00 00 00 00 >ff20000001f17d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ff20000001f17d80: f1 f1 f1 f1 00 f2 f2 f2 00 00 f3 f3 00 00 00 00 ff20000001f17e00: 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 syzkaller@xxxxxxxxxxxxxxxx. 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 syzbot to run the reproducer, reply with: #syz test: git://repo/address.git branch-or-commit-hash If you attach or paste a git patch, syzbot will apply it before testing. 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