================================================================== BUG: KASAN: stack-out-of-bounds in gfs2_dump_glock+0x15b1/0x1bb0 Read of size 8 at addr ffffc900045ffca0 by task syz.3.600/10762 CPU: 0 UID: 0 PID: 10762 Comm: syz.3.600 Not tainted 6.11.0-rc3-syzkaller-00271-g85652baa895b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 gfs2_dump_glock+0x15b1/0x1bb0 gfs2_consist_inode_i+0xf5/0x110 fs/gfs2/util.c:457 gfs2_dirent_scan+0x52b/0x670 gfs2_dirent_search+0x30e/0x8c0 fs/gfs2/dir.c:853 gfs2_dir_search+0xb2/0x2f0 fs/gfs2/dir.c:1653 gfs2_lookupi+0x461/0x5e0 fs/gfs2/inode.c:340 __gfs2_lookup+0xa4/0x280 fs/gfs2/inode.c:896 gfs2_atomic_open+0x9e/0x230 fs/gfs2/inode.c:1297 atomic_open fs/namei.c:3441 [inline] lookup_open fs/namei.c:3549 [inline] open_last_lookups fs/namei.c:3647 [inline] path_openat+0xe8d/0x3470 fs/namei.c:3883 do_filp_open+0x235/0x490 fs/namei.c:3913 do_sys_openat2+0x13e/0x1d0 fs/open.c:1416 do_sys_open fs/open.c:1431 [inline] __do_sys_openat fs/open.c:1447 [inline] __se_sys_openat fs/open.c:1442 [inline] __x64_sys_openat+0x247/0x2a0 fs/open.c:1442 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f3a5e579e79 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f3a5f272038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f3a5e716058 RCX: 00007f3a5e579e79 RDX: 0000000000000000 RSI: 0000000020000140 RDI: ffffffffffffff9c RBP: 00007f3a5e5e7916 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000001 R14: 00007f3a5e716058 R15: 00007ffe1224f528 The buggy address belongs to the virtual mapping at [ffffc900045f8000, ffffc90004601000) created by: copy_process+0x5d1/0x3e10 kernel/fork.c:2217 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xf pfn:0x6055a memcg:ffff88802dd78502 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 000000000000000f 0000000000000000 00000001ffffffff ffff88802dd78502 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 10735, tgid 10735 (syz.3.600), ts 485761092432, free_ts 484697318736 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1493 prep_new_page mm/page_alloc.c:1501 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3442 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4700 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2263 vm_area_alloc_pages mm/vmalloc.c:3584 [inline] __vmalloc_area_node mm/vmalloc.c:3660 [inline] __vmalloc_node_range_noprof+0x971/0x1460 mm/vmalloc.c:3841 alloc_thread_stack_node kernel/fork.c:313 [inline] dup_task_struct+0x444/0x8c0 kernel/fork.c:1113 copy_process+0x5d1/0x3e10 kernel/fork.c:2217 kernel_clone+0x223/0x880 kernel/fork.c:2800 __do_sys_clone3 kernel/fork.c:3104 [inline] __se_sys_clone3+0x2cb/0x350 kernel/fork.c:3083 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 10711 tgid 10711 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1094 [inline] free_unref_folios+0x100f/0x1ac0 mm/page_alloc.c:2660 folios_put_refs+0x76e/0x860 mm/swap.c:1039 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 exit_mmap+0x44f/0xc80 mm/mmap.c:3425 __mmput+0x115/0x380 kernel/fork.c:1345 exit_mm+0x220/0x310 kernel/exit.c:571 do_exit+0x9b2/0x27f0 kernel/exit.c:869 do_group_exit+0x207/0x2c0 kernel/exit.c:1031 __do_sys_exit_group kernel/exit.c:1042 [inline] __se_sys_exit_group kernel/exit.c:1040 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1040 x64_sys_call+0x2634/0x2640 arch/x86/include/generated/asm/syscalls_64.h:232 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffffc900045ffb80: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900045ffc00: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00 >ffffc900045ffc80: 00 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffffc900045ffd00: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ffffc900045ffd80: 04 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================