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. (syz.0.0,5319,0):ocfs2_check_set_options:1244 ERROR: Invalid heartbeat mount options loop0: detected capacity change from 32768 to 32767 OCFS2: ERROR (device loop0): int ocfs2_validate_dx_root(struct super_block *, struct buffer_head *): Dir Index Root # 74 has bad signature XDIR01 On-disk corruption discovered. Please run fsck.ocfs2 once the filesystem is unmounted. OCFS2: File system is now read-only. (syz.0.0,5319,0):ocfs2_find_entry_dx:1029 ERROR: status = -30 ================================================================== BUG: KASAN: use-after-free in ocfs2_dx_dir_lookup_rec+0x206/0x810 fs/ocfs2/dir.c:805 Read of size 4 at addr ffff8880535522c0 by task syz.0.0/5319 CPU: 0 UID: 0 PID: 5319 Comm: syz.0.0 Not tainted 6.14.0-rc3-syzkaller-00267-gff202c5028a1 #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:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0x16e/0x5b0 mm/kasan/report.c:521 kasan_report+0x143/0x180 mm/kasan/report.c:634 ocfs2_dx_dir_lookup_rec+0x206/0x810 fs/ocfs2/dir.c:805 ocfs2_dx_dir_lookup+0x163/0x930 fs/ocfs2/dir.c:860 ocfs2_dx_dir_search fs/ocfs2/dir.c:920 [inline] ocfs2_find_entry_dx fs/ocfs2/dir.c:1034 [inline] ocfs2_find_entry+0x1309/0x2570 fs/ocfs2/dir.c:1071 ocfs2_check_dir_for_entry+0x17b/0x4a0 fs/ocfs2/dir.c:2040 ocfs2_mknod+0x83c/0x2b30 fs/ocfs2/namei.c:288 ocfs2_create+0x1ab/0x470 fs/ocfs2/namei.c:673 lookup_open fs/namei.c:3651 [inline] open_last_lookups fs/namei.c:3750 [inline] path_openat+0x193c/0x3590 fs/namei.c:3986 do_filp_open+0x27f/0x4e0 fs/namei.c:4016 do_sys_openat2+0x13e/0x1d0 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] __x64_sys_openat+0x247/0x2a0 fs/open.c:1454 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:0x7f21e4b8d169 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:00007f21e5a03038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f21e4da5fa0 RCX: 00007f21e4b8d169 RDX: 0000000000105042 RSI: 0000400000000080 RDI: ffffffffffffff9c RBP: 00007f21e4c0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000001ff R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f21e4da5fa0 R15: 00007fff39f88a48 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x53 pfn:0x53552 flags: 0x4fff00000000000(node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000000000 ffffea00014d54c8 ffffea00014d5448 0000000000000000 raw: 0000000000000053 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 0x148c48(GFP_NOFS|__GFP_NOFAIL|__GFP_COMP|__GFP_HARDWALL|__GFP_MOVABLE), pid 5319, tgid 5318 (syz.0.0), ts 69411121065, free_ts 69498731964 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551 prep_new_page mm/page_alloc.c:1559 [inline] get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3477 __alloc_frozen_pages_noprof+0x292/0x710 mm/page_alloc.c:4739 alloc_pages_mpol+0x311/0x660 mm/mempolicy.c:2270 alloc_frozen_pages_noprof mm/mempolicy.c:2341 [inline] alloc_pages_noprof+0x121/0x190 mm/mempolicy.c:2361 folio_alloc_noprof+0x1e/0x30 mm/mempolicy.c:2371 filemap_alloc_folio_noprof+0xe1/0x540 mm/filemap.c:1019 __filemap_get_folio+0x438/0xae0 mm/filemap.c:1970 grow_dev_folio fs/buffer.c:1039 [inline] grow_buffers fs/buffer.c:1105 [inline] __getblk_slow fs/buffer.c:1131 [inline] bdev_getblk+0x1d4/0x670 fs/buffer.c:1431 __getblk include/linux/buffer_head.h:380 [inline] do_readahead fs/jbd2/recovery.c:96 [inline] jread+0x517/0xc80 fs/jbd2/recovery.c:165 do_one_pass+0x394/0x3110 fs/jbd2/recovery.c:646 jbd2_journal_skip_recovery+0xa4/0x250 fs/jbd2/recovery.c:366 jbd2_journal_wipe+0xc9/0x110 fs/jbd2/journal.c:2493 ocfs2_journal_wipe+0xab/0x2a0 fs/ocfs2/journal.c:1192 ocfs2_check_volume fs/ocfs2/super.c:2358 [inline] ocfs2_mount_volume fs/ocfs2/super.c:1762 [inline] ocfs2_fill_super+0x5224/0x74d0 fs/ocfs2/super.c:1083 get_tree_bdev_flags+0x48c/0x5c0 fs/super.c:1636 page last free pid 5319 tgid 5318 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_folios+0xe40/0x18b0 mm/page_alloc.c:2707 folios_put_refs+0x76c/0x860 mm/swap.c:994 folio_batch_release include/linux/pagevec.h:101 [inline] mapping_try_invalidate+0x3f7/0x550 mm/truncate.c:501 loop_set_status+0x194/0x800 drivers/block/loop.c:1273 lo_ioctl+0xce6/0x2870 blkdev_ioctl+0x5d0/0x6f0 block/ioctl.c:693 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892 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: ffff888053552180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888053552200: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff888053552280: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff888053552300: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff888053552380: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================