================================================================== BUG: KASAN: stack-out-of-bounds in gfs2_dump_glock+0x14b3/0x1ad0 Read of size 8 at addr ffffc9000462fcc0 by task syz-executor171/5595 CPU: 0 PID: 5595 Comm: syz-executor171 Not tainted 6.3.0-syzkaller-12049-g58390c8ce1bd #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_report+0x163/0x540 mm/kasan/report.c:462 kasan_report+0x176/0x1b0 mm/kasan/report.c:572 gfs2_dump_glock+0x14b3/0x1ad0 gfs2_consist_inode_i+0xf5/0x110 fs/gfs2/util.c:465 gfs2_dirent_scan+0x512/0x640 fs/gfs2/dir.c:602 gfs2_dirent_search+0x30e/0x8c0 fs/gfs2/dir.c:850 gfs2_dir_search+0xb2/0x2f0 fs/gfs2/dir.c:1650 gfs2_lookupi+0x460/0x5d0 fs/gfs2/inode.c:332 __gfs2_lookup+0xa4/0x270 fs/gfs2/inode.c:888 gfs2_atomic_open+0x9e/0x230 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+0x103c/0x3170 fs/namei.c:3788 do_filp_open+0x234/0x490 fs/namei.c:3818 do_sys_openat2+0x13f/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+0x225/0x270 fs/open.c:1376 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7f281a11eab9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 a1 15 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:00007f2812ca9318 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007f281a1b57b8 RCX: 00007f281a11eab9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200025c0 RBP: 00007f281a1b57b0 R08: 00007f2812ca9700 R09: 0000000000000000 R10: 00007f2812ca9700 R11: 0000000000000246 R12: 0030656c69662f2e R13: 00007ffe3f30c9ef R14: 00007f2812ca9400 R15: 0000000000022000 The buggy address belongs to the virtual mapping at [ffffc90004628000, ffffc90004631000) created by: copy_process+0x5c8/0x42f0 kernel/fork.c:2333 The buggy address belongs to the physical page: page:ffffea0000878840 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x21e21 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 5528, tgid 5528 (syz-executor171), ts 180831089462, free_ts 180333438413 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1722 prep_new_page mm/page_alloc.c:1729 [inline] get_page_from_freelist+0x321c/0x33a0 mm/page_alloc.c:3493 __alloc_pages+0x255/0x670 mm/page_alloc.c:4759 vm_area_alloc_pages mm/vmalloc.c:3009 [inline] __vmalloc_area_node mm/vmalloc.c:3085 [inline] __vmalloc_node_range+0x9ab/0x14e0 mm/vmalloc.c:3257 alloc_thread_stack_node kernel/fork.c:313 [inline] dup_task_struct+0x3e5/0x7d0 kernel/fork.c:1116 copy_process+0x5c8/0x42f0 kernel/fork.c:2333 kernel_clone+0x222/0x800 kernel/fork.c:2918 __do_sys_clone kernel/fork.c:3061 [inline] __se_sys_clone kernel/fork.c:3045 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:3045 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 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+0x903/0xa30 mm/page_alloc.c:2555 free_unref_page_list+0x596/0x830 mm/page_alloc.c:2696 release_pages+0x2193/0x2470 mm/swap.c:1042 __pagevec_release+0x84/0x100 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+0x45d/0x11b0 mm/truncate.c:372 kill_bdev block/bdev.c:76 [inline] blkdev_flush_mapping+0x15a/0x2b0 block/bdev.c:585 blkdev_put_whole block/bdev.c:616 [inline] blkdev_put+0x4b8/0x750 block/bdev.c:876 deactivate_locked_super+0xa4/0x110 fs/super.c:331 cleanup_mnt+0x426/0x4c0 fs/namespace.c:1177 task_work_run+0x24a/0x300 kernel/task_work.c:179 ptrace_notify+0x2cd/0x380 kernel/signal.c:2369 ptrace_report_syscall include/linux/ptrace.h:411 [inline] ptrace_report_syscall_exit include/linux/ptrace.h:473 [inline] syscall_exit_work kernel/entry/common.c:252 [inline] syscall_exit_to_user_mode_prepare kernel/entry/common.c:279 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:284 [inline] syscall_exit_to_user_mode+0x157/0x280 kernel/entry/common.c:297 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffffc9000462fb80: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00 ffffc9000462fc00: 00 f2 f2 f2 f2 f2 00 f2 f2 f2 00 00 00 00 00 00 >ffffc9000462fc80: 00 00 00 00 00 00 00 00 f3 f3 f3 f3 00 00 00 00 ^ ffffc9000462fd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000462fd80: f1 f1 f1 f1 04 f3 f3 f3 00 00 00 00 00 00 00 00 ==================================================================