loop0: detected capacity change from 0 to 32768 ======================================================= WARNING: The mand mount option has been deprecated and and is ignored by this kernel. Remove the mand option from the mount to silence this warning. ======================================================= JBD2: Ignoring recovery information on journal ocfs2: Mounting device (7,0) on (node local, slot 0) with ordered data mode. ================================================================== BUG: KASAN: use-after-free in ocfs2_find_victim_chain fs/ocfs2/suballoc.c:1445 [inline] BUG: KASAN: use-after-free in ocfs2_claim_suballoc_bits+0x10d3/0x2570 fs/ocfs2/suballoc.c:1982 Read of size 4 at addr ffff88804cdf4000 by task syz.0.0/5127 CPU: 0 UID: 0 PID: 5127 Comm: syz.0.0 Not tainted 6.11.0-rc6-syzkaller-00308-gb31c44928842 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 print_address_description mm/kasan/report.c:377 [inline] print_report+0x169/0x550 mm/kasan/report.c:488 kasan_report+0x143/0x180 mm/kasan/report.c:601 ocfs2_find_victim_chain fs/ocfs2/suballoc.c:1445 [inline] ocfs2_claim_suballoc_bits+0x10d3/0x2570 fs/ocfs2/suballoc.c:1982 ocfs2_claim_new_inode+0x338/0x870 fs/ocfs2/suballoc.c:2267 ocfs2_mknod_locked+0x17a/0x3b0 fs/ocfs2/namei.c:633 ocfs2_mknod+0x17d4/0x2b40 fs/ocfs2/namei.c:379 ocfs2_create+0x1ab/0x480 fs/ocfs2/namei.c:672 lookup_open fs/namei.c:3578 [inline] open_last_lookups fs/namei.c:3647 [inline] path_openat+0x1a9a/0x3470 fs/namei.c:3883 do_filp_open+0x235/0x490 fs/namei.c:3913 do_sys_openat2+0x13e/0x1d0 fs/open.c:1416 do_sys_open fs/open.c:1431 [inline] __do_sys_openat fs/open.c:1447 [inline] __se_sys_openat fs/open.c:1442 [inline] __x64_sys_openat+0x247/0x2a0 fs/open.c:1442 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:0x7fdf9ff7cef9 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:00007fdfa0d64038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007fdfa0135f80 RCX: 00007fdf9ff7cef9 RDX: 000000000000275a RSI: 0000000020000040 RDI: ffffffffffffff9c RBP: 00007fdf9ffef046 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007fdfa0135f80 R15: 00007fff964f51e8 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x7fdf94400 pfn:0x4cdf4 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea0001338048 ffffea0001337d48 0000000000000000 raw: 00000007fdf94400 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_COMP|__GFP_ZERO), pid 5127, tgid 5126 (syz.0.0), ts 92005986206, free_ts 92006972736 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1500 prep_new_page mm/page_alloc.c:1508 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3446 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4702 alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2263 folio_alloc_mpol_noprof mm/mempolicy.c:2281 [inline] vma_alloc_folio_noprof+0x12e/0x230 mm/mempolicy.c:2312 folio_prealloc+0x31/0x170 wp_page_copy mm/memory.c:3335 [inline] do_wp_page+0x11cc/0x52f0 mm/memory.c:3727 handle_pte_fault+0x115a/0x6fc0 mm/memory.c:5537 __handle_mm_fault mm/memory.c:5664 [inline] handle_mm_fault+0x1109/0x1bc0 mm/memory.c:5832 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x459/0x8c0 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 page last free pid 5127 tgid 5126 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1101 [inline] free_unref_folios+0x103a/0x1b00 mm/page_alloc.c:2667 folios_put_refs+0x76e/0x860 mm/swap.c:1039 free_pages_and_swap_cache+0x5c8/0x690 mm/swap_state.c:335 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:366 [inline] tlb_flush_mmu+0x3a3/0x680 mm/mmu_gather.c:373 tlb_finish_mmu+0xd4/0x200 mm/mmu_gather.c:465 unmap_region+0x2df/0x350 mm/mmap.c:2441 do_vmi_align_munmap+0x1122/0x18c0 mm/mmap.c:2754 do_vmi_munmap+0x261/0x2f0 mm/mmap.c:2830 __vm_munmap+0x1fc/0x400 mm/mmap.c:3109 __do_sys_munmap mm/mmap.c:3126 [inline] __se_sys_munmap mm/mmap.c:3123 [inline] __x64_sys_munmap+0x68/0x80 mm/mmap.c:3123 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 Memory state around the buggy address: ffff88804cdf3f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88804cdf3f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88804cdf4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88804cdf4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88804cdf4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================