ocfs2: Mounting device (7,4) on (node local, slot 0) with ordered data mode. ================================================================== BUG: KASAN: use-after-free in ocfs2_dir_foreach_blk_id fs/ocfs2/dir.c:1787 [inline] BUG: KASAN: use-after-free in ocfs2_dir_foreach_blk+0x132c/0x1b20 fs/ocfs2/dir.c:1925 Read of size 2 at addr ffff88804f0818c9 by task syz.4.210/6949 CPU: 0 UID: 0 PID: 6949 Comm: syz.4.210 Not tainted 6.14.0-rc2-next-20250214-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:410 [inline] print_report+0x16b/0x5a0 mm/kasan/report.c:510 kasan_report+0x143/0x180 mm/kasan/report.c:623 ocfs2_dir_foreach_blk_id fs/ocfs2/dir.c:1787 [inline] ocfs2_dir_foreach_blk+0x132c/0x1b20 fs/ocfs2/dir.c:1925 ocfs2_readdir+0x2a1/0x5e0 fs/ocfs2/dir.c:1969 wrap_directory_iterator+0x91/0xd0 fs/readdir.c:65 iterate_dir+0x5a9/0x760 fs/readdir.c:108 __do_sys_getdents fs/readdir.c:322 [inline] __se_sys_getdents+0x1fd/0x4e0 fs/readdir.c:308 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fbe8b38cde9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fbe8c257038 EFLAGS: 00000246 ORIG_RAX: 000000000000004e RAX: ffffffffffffffda RBX: 00007fbe8b5a5fa0 RCX: 00007fbe8b38cde9 RDX: 0000000000000054 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007fbe8b40e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fbe8b5a5fa0 R15: 00007ffe1f1a6e68 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4f081 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0xcc0(GFP_KERNEL), pid 1, tgid 1 (swapper/0), ts 24472235949, free_ts 25402023456 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1629 split_free_pages+0xe1/0x2d0 mm/page_alloc.c:6432 alloc_contig_range_noprof+0x10eb/0x1770 mm/page_alloc.c:6609 __alloc_contig_pages mm/page_alloc.c:6639 [inline] alloc_contig_pages_noprof+0x4b3/0x5c0 mm/page_alloc.c:6721 debug_vm_pgtable_alloc_huge_page+0xaf/0x100 mm/debug_vm_pgtable.c:1084 init_args+0x83b/0xb20 mm/debug_vm_pgtable.c:1266 debug_vm_pgtable+0xe4/0x590 mm/debug_vm_pgtable.c:1304 do_one_initcall+0x248/0x930 init/main.c:1257 do_initcall_level+0x157/0x210 init/main.c:1319 do_initcalls+0x71/0xd0 init/main.c:1335 kernel_init_freeable+0x430/0x5d0 init/main.c:1567 kernel_init+0x1d/0x2b0 init/main.c:1457 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1205 [inline] free_frozen_pages+0xe0d/0x10e0 mm/page_alloc.c:2738 free_contig_range+0x14c/0x430 mm/page_alloc.c:6755 destroy_args+0x94/0x4b0 mm/debug_vm_pgtable.c:1017 debug_vm_pgtable+0x551/0x590 mm/debug_vm_pgtable.c:1397 do_one_initcall+0x248/0x930 init/main.c:1257 do_initcall_level+0x157/0x210 init/main.c:1319 do_initcalls+0x71/0xd0 init/main.c:1335 kernel_init_freeable+0x430/0x5d0 init/main.c:1567 kernel_init+0x1d/0x2b0 init/main.c:1457 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff88804f081780: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88804f081800: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff88804f081880: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88804f081900: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88804f081980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================