================================================================== BUG: KASAN: stack-out-of-bounds in gfs2_dump_glock+0x15b1/0x1bb0 Read of size 8 at addr ffffc9000482fca0 by task syz.0.12/5395 CPU: 1 UID: 0 PID: 5395 Comm: syz.0.12 Not tainted 6.11.0-rc3-syzkaller-00321-g810996a36309 #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 __lookup_slow+0x28c/0x3f0 fs/namei.c:1718 lookup_slow+0x53/0x70 fs/namei.c:1735 walk_component+0x2e1/0x410 fs/namei.c:2039 lookup_last fs/namei.c:2542 [inline] path_lookupat+0x16f/0x450 fs/namei.c:2566 filename_lookup+0x256/0x610 fs/namei.c:2595 user_path_at+0x3a/0x60 fs/namei.c:3002 __do_sys_chdir fs/open.c:562 [inline] __se_sys_chdir+0xbc/0x220 fs/open.c:556 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:0x7f76df379e79 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:00007f76e00fa038 EFLAGS: 00000246 ORIG_RAX: 0000000000000050 RAX: ffffffffffffffda RBX: 00007f76df515f80 RCX: 00007f76df379e79 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000140 RBP: 00007f76df3e7916 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f76df515f80 R15: 00007ffda35f5bc8 The buggy address belongs to the virtual mapping at [ffffc90004828000, ffffc90004831000) 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:0xffff88802c51a440 pfn:0x2c51a memcg:ffff88802a0afd82 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff88802c51a440 0000000000000000 00000001ffffffff ffff88802a0afd82 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 5217, tgid 5217 (syz-executor), ts 92639817763, free_ts 91996917717 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_clone kernel/fork.c:2943 [inline] __se_sys_clone kernel/fork.c:2927 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:2927 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 5217 tgid 5217 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1094 [inline] free_unref_page+0xd19/0xea0 mm/page_alloc.c:2612 xfs_buf_free_pages+0x162/0x350 fs/xfs/xfs_buf.c:294 xfs_buf_free+0x118/0x2f0 fs/xfs/xfs_buf.c:325 xfs_buf_rele+0x1262/0x15b0 xfs_buftarg_drain+0x4c4/0x660 fs/xfs/xfs_buf.c:1936 xfs_log_unmount+0x13c/0x1c0 fs/xfs/xfs_log.c:1055 xfs_unmountfs+0x18b/0x230 fs/xfs/xfs_mount.c:1120 xfs_fs_put_super+0x65/0x150 fs/xfs/xfs_super.c:1145 generic_shutdown_super+0x136/0x2d0 fs/super.c:642 kill_block_super+0x44/0x90 fs/super.c:1696 xfs_kill_sb+0x15/0x50 fs/xfs/xfs_super.c:2045 deactivate_locked_super+0xc4/0x130 fs/super.c:473 cleanup_mnt+0x41f/0x4b0 fs/namespace.c:1373 task_work_run+0x24f/0x310 kernel/task_work.c:228 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] exit_to_user_mode_loop kernel/entry/common.c:114 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline] syscall_exit_to_user_mode+0x168/0x370 kernel/entry/common.c:218 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89 Memory state around the buggy address: ffffc9000482fb80: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000482fc00: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00 >ffffc9000482fc80: 00 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffffc9000482fd00: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ffffc9000482fd80: 04 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================