================================================================== BUG: KASAN: stack-out-of-bounds in __bfs+0x154/0x394 kernel/locking/lockdep.c:1708 Read of size 8 at addr ffffaf800c0f3e10 by task syz-executor.0/2045 CPU: 1 PID: 2045 Comm: syz-executor.0 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 [] __bfs+0x154/0x394 kernel/locking/lockdep.c:1708 [] __bfs_forwards kernel/locking/lockdep.c:1803 [inline] [] check_path.constprop.0+0x24/0x46 kernel/locking/lockdep.c:2104 [] check_noncircular+0x11a/0x1fe kernel/locking/lockdep.c:2131 [] check_prev_add kernel/locking/lockdep.c:3063 [inline] [] check_prevs_add kernel/locking/lockdep.c:3186 [inline] [] validate_chain kernel/locking/lockdep.c:3801 [inline] [] __lock_acquire+0x19a4/0x333e kernel/locking/lockdep.c:5027 The buggy address belongs to the page: page:ffffaf807a9ad458 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x8c2f3 flags: 0x8800000000(section=17|node=0|zone=0) raw: 0000008800000000 0000000000000000 ffffaf807a9ad460 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 0x400dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO), pid 2044, ts 1159944848100, free_ts 1056506435100 __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 schedule+0x74/0x14c kernel/sched/core.c:6369 ret_from_exception+0x0/0x10 Memory state around the buggy address: ffffaf800c0f3d00: 00 00 00 00 00 00 00 00 00 00 00 00 f2 f2 f2 f2 ffffaf800c0f3d80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 f2 f2 f2 >ffffaf800c0f3e00: f3 f3 f3 f3 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 ^ ffffaf800c0f3e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffaf800c0f3f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================