================================================================== BUG: KASAN: stack-out-of-bounds in gfs2_dump_glock+0x15b1/0x1bb0 Read of size 8 at addr ffffc9000b53fca0 by task syz.0.46/6108 CPU: 0 UID: 0 PID: 6108 Comm: syz.0.46 Not tainted 6.12.0-rc6-next-20241105-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/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:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 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:342 __gfs2_lookup+0xa4/0x280 fs/gfs2/inode.c:901 __lookup_slow+0x28c/0x3f0 fs/namei.c:1791 lookup_slow+0x53/0x70 fs/namei.c:1808 walk_component fs/namei.c:2112 [inline] link_path_walk+0x99b/0xea0 fs/namei.c:2477 path_lookupat+0xa9/0x450 fs/namei.c:2633 filename_lookup+0x2a3/0x670 fs/namei.c:2663 vfs_statx+0x103/0x490 fs/stat.c:354 vfs_fstatat fs/stat.c:376 [inline] vfs_stat include/linux/fs.h:3391 [inline] __do_sys_newstat fs/stat.c:513 [inline] __se_sys_newstat fs/stat.c:509 [inline] __x64_sys_newstat+0xf7/0x180 fs/stat.c:509 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:0x7f4bcbb7e719 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:00007f4bcc901038 EFLAGS: 00000246 ORIG_RAX: 0000000000000004 RAX: ffffffffffffffda RBX: 00007f4bcbd36058 RCX: 00007f4bcbb7e719 RDX: 0000000000000000 RSI: 0000000020000240 RDI: 0000000020000200 RBP: 00007f4bcbbf139e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f4bcbd36058 R15: 00007ffde973c198 The buggy address belongs to the virtual mapping at [ffffc9000b538000, ffffc9000b541000) created by: copy_process+0x5d1/0x3d50 kernel/fork.c:2201 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88803189e0d8 pfn:0x3189e memcg:ffff88802f37f782 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: ffff88803189e0d8 0000000000000000 00000001ffffffff ffff88802f37f782 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 6053, tgid 6053 (syz.1.37), ts 72618602811, free_ts 72602382541 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1541 prep_new_page mm/page_alloc.c:1549 [inline] get_page_from_freelist+0x3725/0x3870 mm/page_alloc.c:3495 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4771 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265 vm_area_alloc_pages mm/vmalloc.c:3589 [inline] __vmalloc_area_node mm/vmalloc.c:3667 [inline] __vmalloc_node_range_noprof+0x9c9/0x1380 mm/vmalloc.c:3844 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:2201 kernel_clone+0x226/0x8f0 kernel/fork.c:2783 __do_sys_clone3 kernel/fork.c:3087 [inline] __se_sys_clone3+0x2d8/0x360 kernel/fork.c:3066 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 5223 tgid 5223 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1112 [inline] free_unref_page+0xcfb/0xf20 mm/page_alloc.c:2678 discard_slab mm/slub.c:2673 [inline] __put_partials+0xeb/0x130 mm/slub.c:3142 put_cpu_partial+0x17c/0x250 mm/slub.c:3217 __slab_free+0x2ea/0x3d0 mm/slub.c:4468 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x9a/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x14f/0x170 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x23/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4104 [inline] slab_alloc_node mm/slub.c:4153 [inline] kmem_cache_alloc_noprof+0x1d9/0x380 mm/slub.c:4160 getname_flags+0xb7/0x540 fs/namei.c:139 do_readlinkat+0xd8/0x3a0 fs/stat.c:571 __do_sys_readlink fs/stat.c:609 [inline] __se_sys_readlink fs/stat.c:606 [inline] __x64_sys_readlink+0x7f/0x90 fs/stat.c:606 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: ffffc9000b53fb80: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000b53fc00: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00 >ffffc9000b53fc80: 00 f3 f3 f3 f3 f3 f3 f3 00 00 00 00 00 00 00 00 ^ ffffc9000b53fd00: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ffffc9000b53fd80: 04 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================