ocfs2: Mounting device (7,4) on (node local, slot 0) with ordered data mode. ================================================================== BUG: KASAN: use-after-free in ocfs2_find_victim_chain fs/ocfs2/suballoc.c:1447 [inline] BUG: KASAN: use-after-free in ocfs2_claim_suballoc_bits+0x8b2/0x2450 fs/ocfs2/suballoc.c:1996 Read of size 4 at addr ffff88804ce69000 by task syz.4.258/7249 CPU: 1 UID: 0 PID: 7249 Comm: syz.4.258 Not tainted 6.16.0-rc5-syzkaller-00121-gbc9ff192a6c9 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 ocfs2_find_victim_chain fs/ocfs2/suballoc.c:1447 [inline] ocfs2_claim_suballoc_bits+0x8b2/0x2450 fs/ocfs2/suballoc.c:1996 __ocfs2_claim_clusters+0x303/0x8f0 fs/ocfs2/suballoc.c:2421 ocfs2_claim_clusters fs/ocfs2/suballoc.c:2458 [inline] ocfs2_block_group_alloc_contig fs/ocfs2/suballoc.c:432 [inline] ocfs2_block_group_alloc fs/ocfs2/suballoc.c:699 [inline] ocfs2_reserve_suballoc_bits+0xf1e/0x4640 fs/ocfs2/suballoc.c:834 ocfs2_reserve_new_metadata_blocks+0x403/0x940 fs/ocfs2/suballoc.c:984 ocfs2_reserve_new_metadata fs/ocfs2/suballoc.c:1027 [inline] ocfs2_lock_allocators+0x29e/0x5c0 fs/ocfs2/suballoc.c:2761 ocfs2_extend_allocation+0x39b/0x17a0 fs/ocfs2/file.c:589 ocfs2_allocate_unwritten_extents+0x2e9/0x7b0 fs/ocfs2/file.c:1496 __ocfs2_change_file_space+0x901/0xe80 fs/ocfs2/file.c:2023 ocfs2_fallocate+0x1f5/0x240 fs/ocfs2/file.c:2138 vfs_fallocate+0x6a3/0x830 fs/open.c:341 ksys_fallocate fs/open.c:365 [inline] __do_sys_fallocate fs/open.c:370 [inline] __se_sys_fallocate fs/open.c:368 [inline] __x64_sys_fallocate+0xc0/0x110 fs/open.c:368 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:0x7f9892b8e929 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:00007f98939dd038 EFLAGS: 00000246 ORIG_RAX: 000000000000011d RAX: ffffffffffffffda RBX: 00007f9892db5fa0 RCX: 00007f9892b8e929 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000005 RBP: 00007f9892c10b39 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000001000f4 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f9892db5fa0 R15: 00007ffcb9690df8 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x7f01161f6 pfn:0x4ce69 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001acc748 ffffea0001aacb08 0000000000000000 raw: 00000007f01161f6 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 0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO|__GFP_COMP), pid 6737, tgid 6737 (udevd), ts 197720285964, free_ts 197860454402 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419 folio_alloc_mpol_noprof mm/mempolicy.c:2438 [inline] vma_alloc_folio_noprof+0xe4/0x200 mm/mempolicy.c:2473 folio_prealloc+0x30/0x180 mm/memory.c:-1 alloc_anon_folio mm/memory.c:5014 [inline] do_anonymous_page mm/memory.c:5071 [inline] do_pte_missing mm/memory.c:4249 [inline] handle_pte_fault mm/memory.c:6069 [inline] __handle_mm_fault+0x2c88/0x5620 mm/memory.c:6212 handle_mm_fault+0x40a/0x8e0 mm/memory.c:6381 do_user_addr_fault+0x764/0x1390 arch/x86/mm/fault.c:1387 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x76/0xf0 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 page last free pid 5921 tgid 5921 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] free_unref_folios+0xc66/0x14d0 mm/page_alloc.c:2763 folios_put_refs+0x559/0x640 mm/swap.c:992 folios_put include/linux/mm.h:1415 [inline] folio_batch_move_lru+0x319/0x3a0 mm/swap.c:175 __folio_batch_add_and_move+0x5ad/0xd20 mm/swap.c:196 do_anonymous_page mm/memory.c:5118 [inline] do_pte_missing mm/memory.c:4249 [inline] handle_pte_fault mm/memory.c:6069 [inline] __handle_mm_fault+0x3bfa/0x5620 mm/memory.c:6212 handle_mm_fault+0x40a/0x8e0 mm/memory.c:6381 do_user_addr_fault+0x764/0x1390 arch/x86/mm/fault.c:1387 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x76/0xf0 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 Memory state around the buggy address: ffff88804ce68f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804ce68f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88804ce69000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88804ce69080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88804ce69100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================