================================================================== BUG: KASAN: stack-out-of-bounds in gfs2_dump_glock+0x14b3/0x1ad0 Read of size 8 at addr ffffc9000375fcc0 by task syz-executor.0/17072 CPU: 1 PID: 17072 Comm: syz-executor.0 Not tainted 6.3.0-syzkaller-11025-g89d77f71f493 #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_dir_read+0x82f/0x1af0 fs/gfs2/dir.c:1599 gfs2_readdir+0x14e/0x1b0 fs/gfs2/file.c:116 iterate_dir+0x228/0x570 __do_sys_getdents64 fs/readdir.c:369 [inline] __se_sys_getdents64+0x20d/0x4f0 fs/readdir.c:354 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:0x7f514fa8c169 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:00007f51473dd168 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 00007f514fbac050 RCX: 00007f514fa8c169 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007f514fae7ca1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe971ababf R14: 00007f51473dd300 R15: 0000000000022000 The buggy address belongs to the virtual mapping at [ffffc90003758000, ffffc90003761000) created by: copy_process+0x5c8/0x42f0 kernel/fork.c:2332 The buggy address belongs to the physical page: page:ffffea0000ca8780 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x32a1e 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 17039, tgid 17039 (syz-executor.0), ts 1053781064536, free_ts 1043874774322 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:312 [inline] dup_task_struct+0x3e5/0x7d0 kernel/fork.c:1115 copy_process+0x5c8/0x42f0 kernel/fork.c:2332 kernel_clone+0x222/0x800 kernel/fork.c:2917 __do_sys_clone kernel/fork.c:3060 [inline] __se_sys_clone kernel/fork.c:3044 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:3044 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 inode_go_inval+0x1e3/0x2c0 fs/gfs2/glops.c:380 do_xmote+0x50b/0x1400 fs/gfs2/glock.c:733 glock_work_func+0x2d9/0x460 fs/gfs2/glock.c:1076 process_one_work+0x8a0/0x10e0 kernel/workqueue.c:2390 worker_thread+0xa63/0x1210 kernel/workqueue.c:2537 kthread+0x2b8/0x350 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Memory state around the buggy address: ffffc9000375fb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000375fc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000375fc80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ ffffc9000375fd00: f1 f1 f1 f1 04 f3 f3 f3 00 00 00 00 00 00 00 00 ffffc9000375fd80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 ==================================================================