================================================================== BUG: KASAN: out-of-bounds in walk_stackframe+0x11c/0x260 arch/riscv/kernel/stacktrace.c:57 Read of size 8 at addr ffffaf8024eab9d0 by task syz-executor.1/5784 CPU: 0 PID: 5784 Comm: syz-executor.1 Not tainted 5.17.0-rc1-syzkaller-00002-g0966d385830d #0 Hardware name: riscv-virtio,qemu (DT) Call Trace: [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:113 [] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:119 [] __dump_stack lib/dump_stack.c:88 [inline] [] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:106 [] print_address_description.constprop.0+0x2a/0x330 mm/kasan/report.c:255 [] __kasan_report mm/kasan/report.c:442 [inline] [] kasan_report+0x184/0x1e0 mm/kasan/report.c:459 [] check_region_inline mm/kasan/generic.c:183 [inline] [] __asan_load8+0x6e/0x96 mm/kasan/generic.c:256 [] walk_stackframe+0x11c/0x260 arch/riscv/kernel/stacktrace.c:57 [] arch_stack_walk+0x2c/0x3c arch/riscv/kernel/stacktrace.c:146 [] stack_trace_save_tsk+0x14a/0x1bc kernel/stacktrace.c:150 [] proc_pid_stack+0x146/0x1f2 fs/proc/base.c:457 [] proc_single_show+0x9c/0x148 fs/proc/base.c:778 [] traverse.part.0+0x74/0x2ca fs/seq_file.c:111 [] traverse fs/seq_file.c:101 [inline] [] seq_read_iter+0x72c/0x934 fs/seq_file.c:195 [] seq_read+0x26e/0x330 fs/seq_file.c:162 [] do_loop_readv_writev fs/read_write.c:746 [inline] [] do_loop_readv_writev fs/read_write.c:733 [inline] [] do_iter_read+0x324/0x3c2 fs/read_write.c:788 [] vfs_readv+0xfe/0x162 fs/read_write.c:906 [] do_preadv fs/read_write.c:998 [inline] [] __do_sys_preadv fs/read_write.c:1048 [inline] [] sys_preadv+0x182/0x1fa fs/read_write.c:1043 [] ret_from_syscall+0x0/0x2 The buggy address belongs to the page: page:ffffaf807b0ab018 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xa50ab flags: 0xa000000000(section=20|node=0|zone=0) raw: 000000a000000000 0000000000000000 ffffaf807b0ab020 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 raw: 00000000000007ff page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x500dc0(GFP_USER|__GFP_ZERO|__GFP_ACCOUNT), pid 2042, ts 3449368853900, free_ts 3449108562700 __set_page_owner+0x48/0x136 mm/page_owner.c:183 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0xd0/0x10a mm/page_alloc.c:2427 prep_new_page mm/page_alloc.c:2434 [inline] get_page_from_freelist+0x8da/0x12d8 mm/page_alloc.c:4165 __alloc_pages+0x150/0x3b6 mm/page_alloc.c:5389 __alloc_pages_node include/linux/gfp.h:572 [inline] alloc_pages_node include/linux/gfp.h:595 [inline] alloc_thread_stack_node kernel/fork.c:262 [inline] dup_task_struct kernel/fork.c:887 [inline] copy_process+0x482/0x3c34 kernel/fork.c:1998 kernel_clone+0xee/0x920 kernel/fork.c:2555 __do_sys_clone+0xf2/0x12e kernel/fork.c:2672 sys_clone+0x32/0x44 kernel/fork.c:2640 ret_from_syscall+0x0/0x2 page last free stack trace: __reset_page_owner+0x4a/0xea mm/page_owner.c:142 reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1352 [inline] free_pcp_prepare+0x29c/0x45e mm/page_alloc.c:1404 free_unref_page_prepare mm/page_alloc.c:3325 [inline] free_unref_page+0x6a/0x31e mm/page_alloc.c:3404 free_the_page mm/page_alloc.c:706 [inline] __free_pages+0xe2/0x112 mm/page_alloc.c:5474 free_thread_stack kernel/fork.c:297 [inline] release_task_stack kernel/fork.c:434 [inline] put_task_stack+0x1d0/0x2b0 kernel/fork.c:445 finish_task_switch.isra.0+0x3ce/0x420 kernel/sched/core.c:4898 context_switch kernel/sched/core.c:4989 [inline] __schedule+0x58e/0x118e kernel/sched/core.c:6296 preempt_schedule_common+0x4e/0xde kernel/sched/core.c:6462 preempt_schedule+0x34/0x36 kernel/sched/core.c:6487 __local_bh_enable_ip+0x29e/0x2a4 kernel/softirq.c:390 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:167 [inline] _raw_spin_unlock_bh+0x34/0x40 kernel/locking/spinlock.c:210 spin_unlock_bh include/linux/spinlock.h:394 [inline] release_sock+0xf6/0x122 net/core/sock.c:3322 sctp_inet_listen+0x146/0x5b0 net/sctp/socket.c:8591 __sys_listen+0x14e/0x1de net/socket.c:1731 __do_sys_listen net/socket.c:1740 [inline] sys_listen+0x24/0x30 net/socket.c:1738 ret_from_syscall+0x0/0x2 Memory state around the buggy address: ffffaf8024eab880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffaf8024eab900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffaf8024eab980: f1 f1 f1 f1 00 00 f3 f3 00 00 00 00 00 00 00 00 ^ ffffaf8024eaba00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffaf8024eaba80: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ==================================================================