ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode. ================================================================== BUG: KASAN: use-after-free in ocfs2_check_dir_entry fs/ocfs2/dir.c:305 [inline] BUG: KASAN: use-after-free in ocfs2_dir_foreach_blk_id fs/ocfs2/dir.c:1805 [inline] BUG: KASAN: use-after-free in ocfs2_dir_foreach_blk+0x1501/0x18a0 fs/ocfs2/dir.c:1933 Read of size 2 at addr ffff8880701df8c9 by task syz-executor250/5900 CPU: 0 UID: 0 PID: 5900 Comm: syz-executor250 Not tainted 6.16.0-next-20250806-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xca/0x240 mm/kasan/report.c:482 kasan_report+0x118/0x150 mm/kasan/report.c:595 ocfs2_check_dir_entry fs/ocfs2/dir.c:305 [inline] ocfs2_dir_foreach_blk_id fs/ocfs2/dir.c:1805 [inline] ocfs2_dir_foreach_blk+0x1501/0x18a0 fs/ocfs2/dir.c:1933 ocfs2_readdir+0x254/0x4c0 fs/ocfs2/dir.c:1977 wrap_directory_iterator+0x96/0xe0 fs/readdir.c:65 iterate_dir+0x399/0x570 fs/readdir.c:108 __do_sys_getdents fs/readdir.c:326 [inline] __se_sys_getdents+0xe4/0x250 fs/readdir.c:312 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f0c69283329 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 21 18 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:00007fff86e9a4e8 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f0c69283329 RDX: 0000000000000058 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 0000000000000000 R08: 00007fff86e9a520 R09: 00007fff86e9a520 R10: 00007fff86e9a520 R11: 0000000000000246 R12: 00007fff86e9a50c R13: 0000000000000001 R14: 431bde82d7b634db R15: 00007fff86e9a540 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xd17 pfn:0x701df flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001c07808 ffffea0001c07788 0000000000000000 raw: 0000000000000d17 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Movable, gfp_mask 0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), pid 5896, tgid 5896 (syz-executor250), ts 211088450918, free_ts 211435695522 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851 prep_new_page mm/page_alloc.c:1859 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416 folio_alloc_mpol_noprof+0x39/0x70 mm/mempolicy.c:2435 shmem_alloc_folio mm/shmem.c:1908 [inline] shmem_alloc_and_add_folio+0x447/0xf60 mm/shmem.c:1947 shmem_get_folio_gfp+0x59d/0x1660 mm/shmem.c:2597 shmem_get_folio mm/shmem.c:2703 [inline] shmem_write_begin+0xf7/0x2b0 mm/shmem.c:3353 generic_perform_write+0x2c5/0x900 mm/filemap.c:4176 shmem_file_write_iter+0xf8/0x120 mm/shmem.c:3528 new_sync_write fs/read_write.c:593 [inline] vfs_write+0x5c9/0xb30 fs/read_write.c:686 ksys_write+0x145/0x250 fs/read_write.c:738 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5895 tgid 5895 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] free_unref_folios+0xdbd/0x1520 mm/page_alloc.c:2952 folios_put_refs+0x559/0x640 mm/swap.c:997 folio_batch_release include/linux/pagevec.h:101 [inline] shmem_undo_range+0x49e/0x14b0 mm/shmem.c:1157 shmem_truncate_range mm/shmem.c:1269 [inline] shmem_evict_inode+0x272/0xa70 mm/shmem.c:1397 evict+0x504/0x9c0 fs/inode.c:810 __dentry_kill+0x209/0x660 fs/dcache.c:669 dput+0x19f/0x2b0 fs/dcache.c:911 __fput+0x68e/0xa70 fs/file_table.c:476 task_work_run+0x1d4/0x260 kernel/task_work.c:227 ptrace_notify+0x281/0x2c0 kernel/signal.c:2520 ptrace_report_syscall include/linux/ptrace.h:415 [inline] ptrace_report_syscall_exit include/linux/ptrace.h:477 [inline] syscall_exit_work+0xc6/0x1d0 kernel/entry/syscall-common.c:111 syscall_exit_to_user_mode_work include/linux/entry-common.h:173 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline] do_syscall_64+0x2ad/0x3b0 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff8880701df780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880701df800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8880701df880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880701df900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880701df980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================