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 ffff88802086e000 by task syz.0.0/5115 CPU: 0 UID: 0 PID: 5115 Comm: syz.0.0 Not tainted 6.11.0-rc4-syzkaller-00019-gb311c1b497e5 #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_metadata+0x16d/0x580 fs/ocfs2/suballoc.c:2057 ocfs2_create_refcount_tree+0x699/0x15f0 fs/ocfs2/refcounttree.c:590 ocfs2_reflink_remap_blocks+0x2f6/0x1f30 fs/ocfs2/refcounttree.c:4634 ocfs2_remap_file_range+0x600/0x8e0 fs/ocfs2/file.c:2724 vfs_copy_file_range+0xc1f/0x1530 fs/read_write.c:1522 __do_sys_copy_file_range fs/read_write.c:1612 [inline] __se_sys_copy_file_range+0x3f2/0x5d0 fs/read_write.c:1575 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:0x7f2f0cf79e79 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:00007f2f0dcb1038 EFLAGS: 00000246 ORIG_RAX: 0000000000000146 RAX: ffffffffffffffda RBX: 00007f2f0d115f80 RCX: 00007f2f0cf79e79 RDX: 0000000000000007 RSI: 0000000000000000 RDI: 0000000000000009 RBP: 00007f2f0cfe7916 R08: 0000000000000006 R09: 0000000000000000 R10: 00000000200000c0 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f2f0d115f80 R15: 00007fff67e4b858 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x1a1 pfn:0x2086e flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) page_type: 0xbfffffff(buddy) raw: 00fff00000000000 ffffea0000821688 ffffea00004b5608 0000000000000000 raw: 00000000000001a1 0000000000000001 00000000bfffffff 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 4894, tgid 4894 (getty), ts 52709321699, free_ts 86145239084 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1493 prep_new_page mm/page_alloc.c:1501 [inline] get_page_from_freelist+0x2e4c/0x2f10 mm/page_alloc.c:3439 __alloc_pages_noprof+0x256/0x6c0 mm/page_alloc.c:4695 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+0x1029/0x1980 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 74 tgid 74 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1094 [inline] free_unref_folios+0x103a/0x1b00 mm/page_alloc.c:2660 shrink_folio_list+0x2df3/0x8c90 mm/vmscan.c:1463 evict_folios+0x54c7/0x7b60 mm/vmscan.c:4580 try_to_shrink_lruvec+0x9ab/0xbb0 mm/vmscan.c:4775 shrink_one+0x3b9/0x850 mm/vmscan.c:4813 shrink_many mm/vmscan.c:4876 [inline] lru_gen_shrink_node mm/vmscan.c:4954 [inline] shrink_node+0x3799/0x3de0 mm/vmscan.c:5934 kswapd_shrink_node mm/vmscan.c:6762 [inline] balance_pgdat mm/vmscan.c:6954 [inline] kswapd+0x1bcd/0x35a0 mm/vmscan.c:7223 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff88802086df00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802086df80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802086e000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88802086e080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88802086e100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================