================================================================== BUG: KASAN: stack-out-of-bounds in gfs2_dump_glock+0x15b1/0x1bb0 Read of size 8 at addr ffffc90009547ca0 by task syz.0.154/6778 CPU: 0 UID: 0 PID: 6778 Comm: syz.0.154 Not tainted 6.11.0-syzkaller-09959-gabf2050f51fd-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 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 __lookup_slow+0x28c/0x3f0 fs/namei.c:1732 lookup_slow+0x53/0x70 fs/namei.c:1749 walk_component fs/namei.c:2053 [inline] link_path_walk+0x99b/0xea0 fs/namei.c:2418 path_parentat fs/namei.c:2627 [inline] __filename_parentat+0x263/0x6f0 fs/namei.c:2651 filename_parentat fs/namei.c:2669 [inline] filename_create+0xf6/0x540 fs/namei.c:4007 do_mknodat+0x18b/0x5b0 fs/namei.c:4172 __do_sys_mknod fs/namei.c:4218 [inline] __se_sys_mknod fs/namei.c:4216 [inline] __x64_sys_mknod+0x8c/0xa0 fs/namei.c:4216 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:0x7f0a63575bd9 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:00007f0a643eb048 EFLAGS: 00000246 ORIG_RAX: 0000000000000085 RAX: ffffffffffffffda RBX: 00007f0a63704038 RCX: 00007f0a63575bd9 RDX: 0000000000000701 RSI: 0000000000000000 RDI: 0000000020000680 RBP: 00007f0a635e4aa1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007f0a63704038 R15: 00007fff84468688 The buggy address belongs to the virtual mapping at [ffffc90009540000, ffffc90009549000) created by: copy_process+0x5d1/0x3d50 kernel/fork.c:2206 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x100 pfn:0x30fc5 memcg:ffff888140f28902 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000100 0000000000000000 00000001ffffffff ffff888140f28902 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 6633, tgid 6633 (syz.0.127), ts 227869841064, free_ts 227727595930 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1545 [inline] get_page_from_freelist+0x3039/0x3180 mm/page_alloc.c:3457 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4733 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 vm_area_alloc_pages mm/vmalloc.c:3568 [inline] __vmalloc_area_node mm/vmalloc.c:3646 [inline] __vmalloc_node_range_noprof+0xa2b/0x13f0 mm/vmalloc.c:3828 alloc_thread_stack_node kernel/fork.c:314 [inline] dup_task_struct+0x444/0x8c0 kernel/fork.c:1115 copy_process+0x5d1/0x3d50 kernel/fork.c:2206 kernel_clone+0x223/0x880 kernel/fork.c:2787 __do_sys_clone3 kernel/fork.c:3091 [inline] __se_sys_clone3+0x2cb/0x350 kernel/fork.c:3070 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 6634 tgid 6633 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1108 [inline] free_unref_folios+0xee2/0x18a0 mm/page_alloc.c:2686 folios_put_refs+0x76c/0x860 mm/swap.c:1007 folio_batch_release include/linux/pagevec.h:101 [inline] truncate_inode_pages_range+0x47b/0xfc0 mm/truncate.c:346 kill_bdev block/bdev.c:91 [inline] set_blocksize+0x2ee/0x360 block/bdev.c:173 sb_set_blocksize+0x47/0xf0 block/bdev.c:182 init_sb+0x9b3/0x1270 fs/gfs2/ops_fstype.c:503 gfs2_fill_super+0x19b3/0x24d0 fs/gfs2/ops_fstype.c:1216 get_tree_bdev+0x3f7/0x570 fs/super.c:1635 gfs2_get_tree+0x54/0x220 fs/gfs2/ops_fstype.c:1330 vfs_get_tree+0x90/0x2b0 fs/super.c:1800 do_new_mount+0x2be/0xb40 fs/namespace.c:3507 do_mount fs/namespace.c:3847 [inline] __do_sys_mount fs/namespace.c:4055 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4032 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: ffffc90009547b80: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90009547c00: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00 >ffffc90009547c80: 00 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffffc90009547d00: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ffffc90009547d80: 04 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================