================================================================== BUG: KASAN: use-after-free in ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5967 [inline] BUG: KASAN: use-after-free in __ocfs2_flush_truncate_log+0x684/0xf6c fs/ocfs2/alloc.c:6062 Read of size 4 at addr ffff0000e10b7ff8 by task syz-executor/6493 CPU: 1 UID: 0 PID: 6493 Comm: syz-executor Not tainted 6.15.0-rc5-syzkaller-gc32f8dc5aaf9 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xa8/0x254 mm/kasan/report.c:408 print_report+0x68/0x84 mm/kasan/report.c:521 kasan_report+0xb0/0x110 mm/kasan/report.c:634 __asan_report_load4_noabort+0x20/0x2c mm/kasan/report_generic.c:380 ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5967 [inline] __ocfs2_flush_truncate_log+0x684/0xf6c fs/ocfs2/alloc.c:6062 ocfs2_flush_truncate_log+0x4c/0x6c fs/ocfs2/alloc.c:6084 ocfs2_sync_fs+0xf8/0x2a4 fs/ocfs2/super.c:406 sync_filesystem+0x1a0/0x218 fs/sync.c:66 generic_shutdown_super+0x70/0x2b8 fs/super.c:621 kill_block_super+0x44/0x90 fs/super.c:1710 deactivate_locked_super+0xc4/0x12c fs/super.c:473 deactivate_super+0xe0/0x100 fs/super.c:506 cleanup_mnt+0x31c/0x3ac fs/namespace.c:1435 __cleanup_mnt+0x20/0x30 fs/namespace.c:1442 task_work_run+0x1dc/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] do_notify_resume+0x16c/0x1ec arch/arm64/kernel/entry-common.c:151 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_svc+0xb4/0x17c arch/arm64/kernel/entry-common.c:768 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:786 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xa8d pfn:0x1210b7 flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000000 dead000000000100 dead000000000122 0000000000000000 raw: 0000000000000a8d 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000e10b7e80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000e10b7f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff0000e10b7f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff0000e10b8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000e10b8080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ------------[ cut here ]------------ kernel BUG at fs/ocfs2/suballoc.c:2543! Internal error: Oops - BUG: 00000000f2000800 [#1] SMP Modules linked in: CPU: 0 UID: 0 PID: 6493 Comm: syz-executor Tainted: G B 6.15.0-rc5-syzkaller-gc32f8dc5aaf9 #0 PREEMPT Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : _ocfs2_free_suballoc_bits+0xf00/0x1210 fs/ocfs2/suballoc.c:2543 lr : _ocfs2_free_suballoc_bits+0xf00/0x1210 fs/ocfs2/suballoc.c:2543 sp : ffff8000a18e7520 x29: ffff8000a18e76a0 x28: ffff0000f7405370 x27: 0000001d71898000 x26: ffff70001431ceb8 x25: ffff80008212bd18 x24: dfff800000000000 x23: 000000000000aaaa x22: 0000000000000e00 x21: 000000000000aea2 x20: 0000001d71898000 x19: 0000000000000e00 x18: 1fffe0003386ce76 x17: ffff0001fea8b870 x16: ffff80008ad87a9c x15: 0000000000000001 x14: 0000000000000000 x13: 00000000fffffffc x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000ff0100 x9 : 0000000000000000 x8 : ffff0000c9f45b80 x7 : 0000000000000000 x6 : ffff80008212bd18 x5 : 000000000000aaaa x4 : 0000001d71898000 x3 : 00000000000003f8 x2 : ffff0000f1cffcb0 x1 : 0000000000000e00 x0 : 000000000000aea2 Call trace: _ocfs2_free_suballoc_bits+0xf00/0x1210 fs/ocfs2/suballoc.c:2543 (P) _ocfs2_free_clusters+0x514/0x9bc fs/ocfs2/suballoc.c:2646 ocfs2_free_clusters+0x50/0x68 fs/ocfs2/suballoc.c:2667 ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5979 [inline] __ocfs2_flush_truncate_log+0x5d8/0xf6c fs/ocfs2/alloc.c:6062 ocfs2_flush_truncate_log+0x4c/0x6c fs/ocfs2/alloc.c:6084 ocfs2_sync_fs+0xf8/0x2a4 fs/ocfs2/super.c:406 sync_filesystem+0x1a0/0x218 fs/sync.c:66 generic_shutdown_super+0x70/0x2b8 fs/super.c:621 kill_block_super+0x44/0x90 fs/super.c:1710 deactivate_locked_super+0xc4/0x12c fs/super.c:473 deactivate_super+0xe0/0x100 fs/super.c:506 cleanup_mnt+0x31c/0x3ac fs/namespace.c:1435 __cleanup_mnt+0x20/0x30 fs/namespace.c:1442 task_work_run+0x1dc/0x260 kernel/task_work.c:227 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] do_notify_resume+0x16c/0x1ec arch/arm64/kernel/entry-common.c:151 exit_to_user_mode_prepare arch/arm64/kernel/entry-common.c:169 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:178 [inline] el0_svc+0xb4/0x17c arch/arm64/kernel/entry-common.c:768 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:786 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Code: 17ffff1e 97978f19 d4210000 97978f17 (d4210000) ---[ end trace 0000000000000000 ]---