================================================================== BUG: KASAN: use-after-free in ocfs2_find_smallest_chain fs/ocfs2/suballoc.c:413 [inline] BUG: KASAN: use-after-free in ocfs2_block_group_alloc_contig fs/ocfs2/suballoc.c:430 [inline] BUG: KASAN: use-after-free in ocfs2_block_group_alloc fs/ocfs2/suballoc.c:699 [inline] BUG: KASAN: use-after-free in ocfs2_reserve_suballoc_bits+0xca0/0x4254 fs/ocfs2/suballoc.c:832 Read of size 4 at addr ffff0000f6a32004 by task syz.7.357/8857 CPU: 0 UID: 0 PID: 8857 Comm: syz.7.357 Not tainted 6.14.0-rc2-syzkaller-ga64dcfb451e2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x198/0x538 mm/kasan/report.c:489 kasan_report+0xd8/0x138 mm/kasan/report.c:602 __asan_report_load4_noabort+0x20/0x2c mm/kasan/report_generic.c:380 ocfs2_find_smallest_chain fs/ocfs2/suballoc.c:413 [inline] ocfs2_block_group_alloc_contig fs/ocfs2/suballoc.c:430 [inline] ocfs2_block_group_alloc fs/ocfs2/suballoc.c:699 [inline] ocfs2_reserve_suballoc_bits+0xca0/0x4254 fs/ocfs2/suballoc.c:832 ocfs2_reserve_new_metadata_blocks+0x384/0x848 fs/ocfs2/suballoc.c:982 ocfs2_mknod+0xdc8/0x2438 fs/ocfs2/namei.c:347 ocfs2_create+0x194/0x4d4 fs/ocfs2/namei.c:673 lookup_open fs/namei.c:3651 [inline] open_last_lookups fs/namei.c:3750 [inline] path_openat+0x13ec/0x2b1c fs/namei.c:3986 do_filp_open+0x1e8/0x404 fs/namei.c:4016 do_sys_openat2+0x124/0x1b8 fs/open.c:1428 do_sys_open fs/open.c:1443 [inline] __do_sys_openat fs/open.c:1459 [inline] __se_sys_openat fs/open.c:1454 [inline] __arm64_sys_openat+0x1f0/0x240 fs/open.c:1454 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x26c pfn:0x136a32 flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000000 fffffdffc3e12608 fffffdffc3da8cc8 0000000000000000 raw: 000000000000026c 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000f6a31f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000f6a31f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000f6a32000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff0000f6a32080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000f6a32100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== (syz.7.357,8857,0):ocfs2_check_dir_entry:325 ERROR: bad entry in directory #65: rec_len is smaller than minimal - offset=16, inode=65, rec_len=12, name_len=0 (syz.7.357,8857,0):ocfs2_prepare_dir_for_insert:4294 ERROR: status = -2 (syz.7.357,8857,0):ocfs2_mknod:298 ERROR: status = -2 (syz.7.357,8857,0):ocfs2_mknod:502 ERROR: status = -2 (syz.7.357,8857,0):ocfs2_mkdir:658 ERROR: status = -2