================================================================== BUG: KASAN: stack-out-of-bounds in gfs2_dump_glock+0x14b3/0x1ad0 Read of size 8 at addr ffffc90005acfcc0 by task syz-executor.2/9104 CPU: 0 PID: 9104 Comm: syz-executor.2 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:0x7f31cf88c169 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:00007f31d05f3168 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00007f31cf9ac050 RCX: 00007f31cf88c169 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000200025c0 RBP: 00007f31cf8e7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc6845732f R14: 00007f31d05f3300 R15: 0000000000022000 The buggy address belongs to the virtual mapping at [ffffc90005ac8000, ffffc90005ad1000) created by: copy_process+0x5c8/0x42f0 kernel/fork.c:2333 The buggy address belongs to the physical page: page:ffffea0000cd0780 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3341e 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 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 27690, tgid 27690 (syz-executor.3), ts 1438539239925, free_ts 1438444866634 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 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x64/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: ffffc90005acfb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90005acfc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90005acfc80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffffc90005acfd00: f1 f1 f1 f1 04 f3 f3 f3 00 00 00 00 00 00 00 00 ffffc90005acfd80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 ==================================================================