gfs2: fsid=syz:syz.0: H: s:SH f:H e:0 p:5272 [syz-executor297] iterate_dir+0x1e5/0x5b0 fs/readdir.c:106 ================================================================== BUG: KASAN: stack-out-of-bounds in gfs2_dump_glock+0x18aa/0x1c80 fs/gfs2/glock.c:2369 Read of size 8 at addr ffffc9000387fd40 by task syz-executor297/5274 CPU: 0 PID: 5274 Comm: syz-executor297 Not tainted 6.7.0-rc4-syzkaller-00009-gbee0e7762ad2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 gfs2_dump_glock+0x18aa/0x1c80 fs/gfs2/glock.c:2369 gfs2_consist_inode_i+0x104/0x150 fs/gfs2/util.c:456 gfs2_dirent_scan+0x2f9/0x3c0 fs/gfs2/dir.c:602 gfs2_dirent_search+0x455/0x5c0 fs/gfs2/dir.c:850 gfs2_dir_search+0x98/0x2e0 fs/gfs2/dir.c:1650 gfs2_lookupi+0x4b6/0x6e0 fs/gfs2/inode.c:340 __gfs2_lookup+0xa1/0x290 fs/gfs2/inode.c:896 gfs2_atomic_open+0xd9/0x240 fs/gfs2/inode.c:1297 atomic_open fs/namei.c:3340 [inline] lookup_open.isra.0+0xc8e/0x13b0 fs/namei.c:3448 open_last_lookups fs/namei.c:3546 [inline] path_openat+0x922/0x2c50 fs/namei.c:3776 do_filp_open+0x1de/0x430 fs/namei.c:3809 do_sys_openat2+0x176/0x1e0 fs/open.c:1440 do_sys_open fs/open.c:1455 [inline] __do_sys_open fs/open.c:1463 [inline] __se_sys_open fs/open.c:1459 [inline] __x64_sys_open+0x154/0x1e0 fs/open.c:1459 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7fe1cabedf19 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 1a 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fe1cab89228 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007fe1cac886d8 RCX: 00007fe1cabedf19 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200025c0 RBP: 00007fe1cac886d0 R08: 00007ffdbb8b55c7 R09: 00007fe1cab896c0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe1cac886dc R13: 0030656c69662f2e R14: 00007fe1cac420c0 R15: 00007ffdbb8b55c8 The buggy address belongs to the virtual mapping at [ffffc90003878000, ffffc90003881000) created by: kernel_clone+0xfd/0x930 kernel/fork.c:2907 The buggy address belongs to the physical page: page:ffffea000054a200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x15288 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 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 5259, tgid 5259 (syz-executor297), ts 1009643592517, free_ts 998734204659 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0xa25/0x36d0 mm/page_alloc.c:3312 __alloc_pages+0x22e/0x2420 mm/page_alloc.c:4568 alloc_pages_mpol+0x258/0x5f0 mm/mempolicy.c:2133 vm_area_alloc_pages mm/vmalloc.c:3063 [inline] __vmalloc_area_node mm/vmalloc.c:3139 [inline] __vmalloc_node_range+0xa6e/0x1540 mm/vmalloc.c:3320 alloc_thread_stack_node kernel/fork.c:309 [inline] dup_task_struct kernel/fork.c:1118 [inline] copy_process+0x138b/0x73f0 kernel/fork.c:2332 kernel_clone+0xfd/0x930 kernel/fork.c:2907 __do_sys_clone3+0x1f1/0x260 kernel/fork.c:3208 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x4fa/0xaa0 mm/page_alloc.c:2347 free_unref_page_list+0xe6/0xb40 mm/page_alloc.c:2533 release_pages+0x32a/0x14f0 mm/swap.c:1042 __folio_batch_release+0x77/0xe0 mm/swap.c:1062 folio_batch_release include/linux/pagevec.h:83 [inline] truncate_inode_pages_range+0x33e/0xf00 mm/truncate.c:371 kill_bdev block/bdev.c:76 [inline] blkdev_flush_mapping+0x14d/0x310 block/bdev.c:632 blkdev_put_whole+0xb9/0xe0 block/bdev.c:663 blkdev_put+0x40f/0x8e0 block/bdev.c:944 bdev_release+0x4f/0x80 block/bdev.c:954 kill_block_super+0x77/0x90 fs/super.c:1670 gfs2_kill_sb+0x361/0x410 fs/gfs2/ops_fstype.c:1804 deactivate_locked_super+0xbc/0x1a0 fs/super.c:484 deactivate_super+0xde/0x100 fs/super.c:517 cleanup_mnt+0x222/0x450 fs/namespace.c:1256 task_work_run+0x14d/0x240 kernel/task_work.c:180 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0x217/0x240 kernel/entry/common.c:204 Memory state around the buggy address: ffffc9000387fc00: 00 00 00 00 00 00 00 f3 f3 f3 f3 00 00 00 00 00 ffffc9000387fc80: 00 00 00 00 00 00 00 f1 f1 f1 f1 f1 f1 00 00 00 >ffffc9000387fd00: 00 00 00 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 00 ^ ffffc9000387fd80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f3 f3 f3 ffffc9000387fe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================