================================================================== BUG: KASAN: stack-out-of-bounds in gfs2_dump_glock+0x1525/0x1b50 Read of size 8 at addr ffffc9000b477cc0 by task syz-executor.0/6075 CPU: 1 PID: 6075 Comm: syz-executor.0 Not tainted 6.4.0-rc4-syzkaller-00031-g8b817fded42d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_report+0x15f/0x540 mm/kasan/report.c:462 kasan_report+0x172/0x1a0 mm/kasan/report.c:572 gfs2_dump_glock+0x1525/0x1b50 gfs2_consist_inode_i+0xf1/0x110 fs/gfs2/util.c:465 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+0x45c/0x5d0 fs/gfs2/inode.c:332 __gfs2_lookup+0xa0/0x270 fs/gfs2/inode.c:888 gfs2_atomic_open+0x9a/0x220 fs/gfs2/inode.c:1289 atomic_open fs/namei.c:3355 [inline] lookup_open fs/namei.c:3463 [inline] open_last_lookups fs/namei.c:3560 [inline] path_openat+0x1038/0x3170 fs/namei.c:3788 do_filp_open+0x230/0x480 fs/namei.c:3818 do_sys_openat2+0x13b/0x500 fs/open.c:1356 do_sys_open fs/open.c:1372 [inline] __do_sys_open fs/open.c:1380 [inline] __se_sys_open fs/open.c:1376 [inline] __x64_sys_open+0x221/0x270 fs/open.c:1376 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7ff93c08c169 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff93cd98168 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007ff93c1ac050 RCX: 00007ff93c08c169 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200025c0 RBP: 00007ff93c0e7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffcfcf2110f R14: 00007ff93cd98300 R15: 0000000000022000 The buggy address belongs to the virtual mapping at [ffffc9000b470000, ffffc9000b479000) created by: copy_process+0x5c4/0x42f0 kernel/fork.c:2333 The buggy address belongs to the physical page: page:ffffea0001f37e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7cdf8 memcg:ffff888014ec7d02 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff ffff888014ec7d02 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 6068, tgid 6068 (syz-executor.0), ts 161193617657, free_ts 155740303077 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1d2/0x1f0 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0x31f8/0x3370 mm/page_alloc.c:3502 __alloc_pages+0x251/0x660 mm/page_alloc.c:4768 vm_area_alloc_pages mm/vmalloc.c:3009 [inline] __vmalloc_area_node mm/vmalloc.c:3085 [inline] __vmalloc_node_range+0x9a7/0x14d0 mm/vmalloc.c:3257 alloc_thread_stack_node kernel/fork.c:313 [inline] dup_task_struct+0x3e5/0x7d0 kernel/fork.c:1116 copy_process+0x5c4/0x42f0 kernel/fork.c:2333 kernel_clone+0x219/0x860 kernel/fork.c:2918 __do_sys_clone kernel/fork.c:3061 [inline] __se_sys_clone kernel/fork.c:3045 [inline] __x64_sys_clone+0x254/0x2a0 kernel/fork.c:3045 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x8ee/0xa10 mm/page_alloc.c:2564 free_unref_page_list+0x58e/0x830 mm/page_alloc.c:2705 release_pages+0x275c/0x2a70 mm/swap.c:1042 __pagevec_release+0x80/0xf0 mm/swap.c:1062 pagevec_release include/linux/pagevec.h:63 [inline] folio_batch_release include/linux/pagevec.h:132 [inline] truncate_inode_pages_range+0x459/0x11a0 mm/truncate.c:372 inode_go_inval+0x1df/0x2b0 fs/gfs2/glops.c:380 do_xmote+0x50b/0x1400 fs/gfs2/glock.c:733 glock_work_func+0x2d5/0x460 fs/gfs2/glock.c:1076 process_one_work+0x894/0x10c0 kernel/workqueue.c:2405 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2552 kthread+0x2b0/0x340 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffffc9000b477b80: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00 ffffc9000b477c00: 00 f2 f2 f2 f2 f2 00 f2 f2 f2 00 00 00 00 00 00 >ffffc9000b477c80: 00 00 00 00 00 00 00 00 f3 f3 f3 f3 00 00 00 00 ^ ffffc9000b477d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000b477d80: f1 f1 f1 f1 04 f3 f3 f3 00 00 00 00 00 00 00 00 ==================================================================