loop0: detected capacity change from 0 to 32768 ================================================================== BUG: KASAN: use-after-free in __ocfs2_find_path+0x203/0x7e0 fs/ocfs2/alloc.c:1824 Read of size 4 at addr ffff88805cf31000 by task syz.0.15/6718 CPU: 1 UID: 0 PID: 6718 Comm: syz.0.15 Not tainted 6.13.0-syzkaller-09760-g69e858e0b8b2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 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:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 __ocfs2_find_path+0x203/0x7e0 fs/ocfs2/alloc.c:1824 ocfs2_find_leaf+0xcf/0x230 fs/ocfs2/alloc.c:1938 ocfs2_get_clusters_nocache+0x1b6/0xca0 fs/ocfs2/extent_map.c:418 ocfs2_get_clusters+0x5bd/0xbd0 fs/ocfs2/extent_map.c:631 ocfs2_extent_map_get_blocks+0x24c/0x7d0 fs/ocfs2/extent_map.c:678 ocfs2_read_virt_blocks+0x313/0xb10 fs/ocfs2/extent_map.c:993 ocfs2_read_dir_block fs/ocfs2/dir.c:508 [inline] ocfs2_find_entry_el fs/ocfs2/dir.c:715 [inline] ocfs2_find_entry+0x433/0x2570 fs/ocfs2/dir.c:1091 ocfs2_find_files_on_disk+0xff/0x360 fs/ocfs2/dir.c:1994 ocfs2_lookup_ino_from_name+0xb1/0x1e0 fs/ocfs2/dir.c:2016 _ocfs2_get_system_file_inode fs/ocfs2/sysfile.c:136 [inline] ocfs2_get_system_file_inode+0x305/0x7b0 fs/ocfs2/sysfile.c:112 ocfs2_init_global_system_inodes+0x32c/0x730 fs/ocfs2/super.c:461 ocfs2_initialize_super fs/ocfs2/super.c:2193 [inline] ocfs2_fill_super+0x4b69/0x7200 fs/ocfs2/super.c:993 get_tree_bdev_flags+0x48c/0x5c0 fs/super.c:1636 vfs_get_tree+0x90/0x2b0 fs/super.c:1814 do_new_mount+0x2be/0xb40 fs/namespace.c:3560 do_mount fs/namespace.c:3900 [inline] __do_sys_mount fs/namespace.c:4111 [inline] __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4088 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:0x7f43b317feba Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 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:00007f43b3f96e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f43b3f96ef0 RCX: 00007f43b317feba RDX: 0000000020004440 RSI: 0000000020000780 RDI: 00007f43b3f96eb0 RBP: 0000000020004440 R08: 00007f43b3f96ef0 R09: 0000000001000000 R10: 0000000001000000 R11: 0000000000000246 R12: 0000000020000780 R13: 00007f43b3f96eb0 R14: 000000000000444a R15: 00000000200005c0 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x5cf31 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea000173cc88 ffff8880b8744870 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as freed page last allocated via order 0, migratetype Unmovable, gfp_mask 0xcc0(GFP_KERNEL), pid 1, tgid 1 (swapper/0), ts 16442244158, free_ts 17252036300 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1551 split_free_pages+0xe1/0x2d0 mm/page_alloc.c:6355 alloc_contig_range_noprof+0x10eb/0x1770 mm/page_alloc.c:6532 __alloc_contig_pages mm/page_alloc.c:6562 [inline] alloc_contig_pages_noprof+0x4b3/0x5c0 mm/page_alloc.c:6644 debug_vm_pgtable_alloc_huge_page+0xaf/0x100 mm/debug_vm_pgtable.c:1084 init_args+0x83b/0xb20 mm/debug_vm_pgtable.c:1266 debug_vm_pgtable+0xe0/0x550 mm/debug_vm_pgtable.c:1304 do_one_initcall+0x248/0x870 init/main.c:1257 do_initcall_level+0x157/0x210 init/main.c:1319 do_initcalls+0x3f/0x80 init/main.c:1335 kernel_init_freeable+0x435/0x5d0 init/main.c:1568 kernel_init+0x1d/0x2b0 init/main.c:1457 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 page last free pid 1 tgid 1 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_frozen_pages+0xe04/0x10e0 mm/page_alloc.c:2660 free_contig_range+0x14c/0x430 mm/page_alloc.c:6678 destroy_args+0x94/0x4b0 mm/debug_vm_pgtable.c:1017 debug_vm_pgtable+0x4be/0x550 mm/debug_vm_pgtable.c:1397 do_one_initcall+0x248/0x870 init/main.c:1257 do_initcall_level+0x157/0x210 init/main.c:1319 do_initcalls+0x3f/0x80 init/main.c:1335 kernel_init_freeable+0x435/0x5d0 init/main.c:1568 kernel_init+0x1d/0x2b0 init/main.c:1457 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Memory state around the buggy address: ffff88805cf30f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88805cf30f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88805cf31000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff88805cf31080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff88805cf31100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================