================================================================== BUG: KASAN: stack-out-of-bounds in gfs2_dump_glock+0x1573/0x1ba0 Read of size 8 at addr ffffc9000339fcc0 by task syz.4.403/5283 CPU: 1 PID: 5283 Comm: syz.4.403 Not tainted 6.1.100-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_address_description mm/kasan/report.c:284 [inline] print_report+0x15f/0x4f0 mm/kasan/report.c:395 kasan_report+0x136/0x160 mm/kasan/report.c:495 gfs2_dump_glock+0x1573/0x1ba0 gfs2_consist_inode_i+0xf1/0x110 fs/gfs2/util.c:464 gfs2_dirent_scan+0x512/0x640 fs/gfs2/dir.c:602 gfs2_dirent_search+0x30a/0x8c0 fs/gfs2/dir.c:850 gfs2_dir_search+0xae/0x2f0 fs/gfs2/dir.c:1650 gfs2_lookupi+0x45f/0x5e0 fs/gfs2/inode.c:323 __gfs2_lookup+0xa0/0x270 fs/gfs2/inode.c:870 gfs2_atomic_open+0x9a/0x220 fs/gfs2/inode.c:1274 atomic_open fs/namei.c:3347 [inline] lookup_open fs/namei.c:3455 [inline] open_last_lookups fs/namei.c:3552 [inline] path_openat+0xf4e/0x2e60 fs/namei.c:3782 do_filp_open+0x230/0x480 fs/namei.c:3812 do_sys_openat2+0x13b/0x4f0 fs/open.c:1318 do_sys_open fs/open.c:1334 [inline] __do_sys_open fs/open.c:1342 [inline] __se_sys_open fs/open.c:1338 [inline] __x64_sys_open+0x221/0x270 fs/open.c:1338 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fa15cb75b59 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:00007fa15d8a4048 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007fa15cd06038 RCX: 00007fa15cb75b59 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000100 RBP: 00007fa15cbe4e5d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000006e R14: 00007fa15cd06038 R15: 00007ffe9c2f8ee8 The buggy address belongs to the virtual mapping at [ffffc90003398000, ffffc900033a1000) created by: copy_process+0x637/0x4060 kernel/fork.c:2098 The buggy address belongs to the physical page: page:ffffea000198b840 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x662e1 memcg:ffff8880226f7882 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff8880226f7882 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 5255, tgid 5255 (syz.4.396), ts 162354864290, free_ts 161362376419 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2517 prep_new_page mm/page_alloc.c:2524 [inline] get_page_from_freelist+0x322e/0x33b0 mm/page_alloc.c:4283 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5551 vm_area_alloc_pages mm/vmalloc.c:2992 [inline] __vmalloc_area_node mm/vmalloc.c:3068 [inline] __vmalloc_node_range+0x92b/0x1490 mm/vmalloc.c:3240 alloc_thread_stack_node kernel/fork.c:311 [inline] dup_task_struct+0x3e5/0x6d0 kernel/fork.c:988 copy_process+0x637/0x4060 kernel/fork.c:2098 kernel_clone+0x222/0x920 kernel/fork.c:2682 __do_sys_clone3 kernel/fork.c:2981 [inline] __se_sys_clone3+0x373/0x410 kernel/fork.c:2965 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1444 [inline] free_pcp_prepare mm/page_alloc.c:1494 [inline] free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3362 free_unref_page_list+0x663/0x900 mm/page_alloc.c:3503 release_pages+0x2836/0x2b40 mm/swap.c:1055 __pagevec_release+0x80/0xf0 mm/swap.c:1075 pagevec_release include/linux/pagevec.h:71 [inline] folio_batch_release include/linux/pagevec.h:135 [inline] invalidate_mapping_pagevec+0x621/0x730 mm/truncate.c:542 btrfs_get_bdev_and_sb+0x109/0x190 fs/btrfs/volumes.c:518 btrfs_open_one_device fs/btrfs/volumes.c:611 [inline] open_fs_devices+0x28c/0x1180 fs/btrfs/volumes.c:1244 btrfs_mount_root+0x531/0x930 fs/btrfs/super.c:1807 legacy_get_tree+0xeb/0x180 fs/fs_context.c:632 vfs_get_tree+0x88/0x270 fs/super.c:1562 fc_mount fs/namespace.c:1043 [inline] vfs_kern_mount+0xb8/0x150 fs/namespace.c:1073 btrfs_mount+0x39b/0xb40 fs/btrfs/super.c:1895 legacy_get_tree+0xeb/0x180 fs/fs_context.c:632 vfs_get_tree+0x88/0x270 fs/super.c:1562 do_new_mount+0x2ba/0xb40 fs/namespace.c:3051 do_mount fs/namespace.c:3394 [inline] __do_sys_mount fs/namespace.c:3602 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3579 Memory state around the buggy address: ffffc9000339fb80: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00 ffffc9000339fc00: 00 f2 f2 f2 f2 f2 00 f2 f2 f2 00 00 00 00 00 00 >ffffc9000339fc80: 00 00 00 00 00 00 00 00 f3 f3 f3 f3 00 00 00 00 ^ ffffc9000339fd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000339fd80: f1 f1 f1 f1 04 f3 f3 f3 00 00 00 00 00 00 00 00 ==================================================================