================================================================== BUG: KASAN: out-of-bounds in walk_stackframe+0x3e0/0x44e arch/riscv/kernel/stacktrace.c:67 Read of size 8 at addr ffff8f8002e475a8 by task syz.6.1129/12559 CPU: 0 UID: 0 PID: 12559 Comm: syz.6.1129 Not tainted syzkaller #0 PREEMPT Hardware name: riscv-virtio,qemu (DT) Call Trace: [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:132 [] show_stack+0x30/0x3c arch/riscv/kernel/stacktrace.c:138 [] __dump_stack lib/dump_stack.c:94 [inline] [] dump_stack_lvl+0x12e/0x1a6 lib/dump_stack.c:120 [] print_address_description mm/kasan/report.c:378 [inline] [] print_report+0x28e/0x5a2 mm/kasan/report.c:482 [] kasan_report+0xf0/0x214 mm/kasan/report.c:595 [] __asan_report_load8_noabort+0x12/0x1a mm/kasan/report_generic.c:381 [] walk_stackframe+0x3e0/0x44e arch/riscv/kernel/stacktrace.c:67 [] arch_stack_walk+0x1c/0x26 arch/riscv/kernel/stacktrace.c:165 [] stack_trace_save_tsk+0x16c/0x1f6 kernel/stacktrace.c:150 [] proc_pid_stack+0x176/0x27e fs/proc/base.c:492 [] proc_single_show+0xea/0x1cc fs/proc/base.c:812 [] traverse.part.0.constprop.0+0x126/0x530 fs/seq_file.c:111 [] traverse fs/seq_file.c:98 [inline] [] seq_read_iter+0x7fe/0x104a fs/seq_file.c:195 [] seq_read+0x2a0/0x41e fs/seq_file.c:162 [] vfs_read+0x2ee/0xbba fs/read_write.c:570 [] ksys_pread64 fs/read_write.c:763 [inline] [] __do_sys_pread64 fs/read_write.c:771 [inline] [] __se_sys_pread64 fs/read_write.c:768 [inline] [] __riscv_sys_pread64+0x1d6/0x22c fs/read_write.c:768 [] syscall_handler+0x94/0x118 arch/riscv/include/asm/syscall.h:112 [] do_trap_ecall_u+0x396/0x530 arch/riscv/kernel/traps.c:343 [] handle_exception+0x146/0x152 arch/riscv/kernel/entry.S:198 The buggy address belongs to a 8-page vmalloc region starting at 0xffff8f8002e40000 allocated at kernel_clone+0x128/0xd9e kernel/fork.c:2605 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffffaf8000000000 pfn:0x99c86 memcg:ffffaf8013a9bb02 flags: 0xffe000000000000(node=0|zone=0|lastcpupid=0x7ff) raw: 0ffe000000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffffaf8000000000 0000000000000000 00000001ffffffff ffffaf8013a9bb02 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 12559, tgid 12558 (syz.6.1129), ts 9559515990000, free_ts 9559313590700 __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:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x7fa/0x359a mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x22e/0x2120 mm/page_alloc.c:5148 alloc_pages_mpol+0x1fa/0x5bc mm/mempolicy.c:2416 alloc_frozen_pages_noprof+0x174/0x2f0 mm/mempolicy.c:2487 alloc_pages_noprof+0x20/0x48 mm/mempolicy.c:2507 vm_area_alloc_pages mm/vmalloc.c:3642 [inline] __vmalloc_area_node mm/vmalloc.c:3720 [inline] __vmalloc_node_range_noprof+0x624/0x11b0 mm/vmalloc.c:3893 __vmalloc_node_noprof+0x104/0x136 mm/vmalloc.c:3956 alloc_thread_stack_node kernel/fork.c:311 [inline] dup_task_struct kernel/fork.c:882 [inline] copy_process+0x32ec/0x72ce kernel/fork.c:2004 kernel_clone+0x128/0xd9e kernel/fork.c:2605 __do_sys_clone+0xfe/0x13e kernel/fork.c:2748 __se_sys_clone kernel/fork.c:2716 [inline] __riscv_sys_clone+0xa0/0x10e kernel/fork.c:2716 syscall_handler+0x94/0x118 arch/riscv/include/asm/syscall.h:112 do_trap_ecall_u+0x396/0x530 arch/riscv/kernel/traps.c:343 handle_exception+0x146/0x152 arch/riscv/kernel/entry.S:198 page last free pid 10975 tgid 10975 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:1395 [inline] __free_frozen_pages+0x836/0x145e mm/page_alloc.c:2895 ___free_pages+0x146/0x1c8 mm/page_alloc.c:5229 __free_pages+0xe/0x16 mm/page_alloc.c:5260 pagetable_free include/linux/mm.h:2898 [inline] pagetable_dtor_free include/linux/mm.h:2996 [inline] __tlb_remove_table include/asm-generic/tlb.h:220 [inline] __tlb_remove_table_free mm/mmu_gather.c:227 [inline] tlb_remove_table_rcu+0xde/0x160 mm/mmu_gather.c:290 rcu_do_batch kernel/rcu/tree.c:2605 [inline] rcu_core+0xa24/0x1ef8 kernel/rcu/tree.c:2861 rcu_core_si+0xc/0x14 kernel/rcu/tree.c:2878 handle_softirqs+0x4b2/0x132e kernel/softirq.c:579 __do_softirq kernel/softirq.c:613 [inline] invoke_softirq kernel/softirq.c:453 [inline] __irq_exit_rcu+0x18c/0x550 kernel/softirq.c:680 irq_exit_rcu+0x10/0xf8 kernel/softirq.c:696 handle_riscv_irq+0x40/0x4c arch/riscv/kernel/traps.c:390 call_on_irq_stack+0x32/0x40 arch/riscv/kernel/entry.S:361 Memory state around the buggy address: ffff8f8002e47480: f1 f1 f1 f1 f1 f1 04 f2 00 00 f2 f2 00 00 00 f3 ffff8f8002e47500: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8f8002e47580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffff8f8002e47600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8f8002e47680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================