================================================================== 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 ffff000102386ac0 by task syz.2.330/8706 CPU: 0 UID: 0 PID: 8706 Comm: syz.2.330 Not tainted syzkaller #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xa8/0x238 mm/kasan/report.c:378 print_report+0x68/0x84 mm/kasan/report.c:482 kasan_report+0xb0/0x110 mm/kasan/report.c:595 __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 fs/ocfs2/alloc.c:6084 [inline] ocfs2_truncate_log_shutdown+0x118/0x284 fs/ocfs2/alloc.c:6343 ocfs2_dismount_volume+0x1f4/0x8cc fs/ocfs2/super.c:1827 ocfs2_put_super+0xec/0x320 fs/ocfs2/super.c:1553 generic_shutdown_super+0x12c/0x2b8 fs/super.c:642 kill_block_super+0x44/0x90 fs/super.c:1729 deactivate_locked_super+0xc4/0x12c fs/super.c:473 deactivate_super+0xe0/0x100 fs/super.c:506 cleanup_mnt+0x31c/0x3ac fs/namespace.c:1318 __cleanup_mnt+0x20/0x30 fs/namespace.c:1325 task_work_run+0x1dc/0x260 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x524/0x1a14 kernel/exit.c:966 do_group_exit+0x194/0x22c kernel/exit.c:1107 get_signal+0x11dc/0x12f8 kernel/signal.c:3034 arch_do_signal_or_restart+0x274/0x4414 arch/arm64/kernel/signal.c:1619 exit_to_user_mode_loop+0x7c/0x178 kernel/entry/common.c:40 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] arm64_exit_to_user_mode arch/arm64/kernel/entry-common.c:81 [inline] asm_exit_to_user_mode+0x13c/0x190 arch/arm64/kernel/entry-common.c:89 ret_from_fork+0x1c/0x20 arch/arm64/kernel/entry.S:844 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x10c pfn:0x142386 flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) raw: 05ffc00000000000 dead000000000100 dead000000000122 0000000000000000 raw: 000000000000010c 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff000102386980: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff000102386a00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff000102386a80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff000102386b00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff000102386b80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== ------------[ cut here ]------------ kernel BUG at fs/ocfs2/suballoc.c:2569! Internal error: Oops - BUG: 00000000f2000800 [#1] SMP Modules linked in: CPU: 0 UID: 0 PID: 8706 Comm: syz.2.330 Tainted: G B syzkaller #0 PREEMPT Tainted: [B]=BAD_PAGE Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/2025 pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--) pc : _ocfs2_free_suballoc_bits+0xf00/0x1210 fs/ocfs2/suballoc.c:2569 lr : _ocfs2_free_suballoc_bits+0xf00/0x1210 fs/ocfs2/suballoc.c:2569 sp : ffff8000a2646f60 x29: ffff8000a26470e0 x28: ffff0001031fbb58 x27: 00000006903fe000 x26: ffff7000144c8e00 x25: ffff8000821ea988 x24: dfff800000000000 x23: 000000007865646e x22: 0000000000000e00 x21: 000000007865668e x20: 00000006903fe000 x19: 0000000000000e00 x18: 1fffe000337d4a90 x17: ffff0001fea8c870 x16: ffff80008add1148 x15: 0000000000000001 x14: 0000000000000000 x13: 00000000fffffffc x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000ff0100 x9 : 0000000000000000 x8 : ffff0000de473d80 x7 : 0000000000000000 x6 : ffff8000821ea988 x5 : 000000007865646e x4 : 00000006903fe000 x3 : 0000000000000220 x2 : ffff0000c158ecb0 x1 : 0000000000000e00 x0 : 000000007865668e Call trace: _ocfs2_free_suballoc_bits+0xf00/0x1210 fs/ocfs2/suballoc.c:2569 (P) _ocfs2_free_clusters+0x514/0x9bc fs/ocfs2/suballoc.c:2672 ocfs2_free_clusters+0x50/0x68 fs/ocfs2/suballoc.c:2693 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 fs/ocfs2/alloc.c:6084 [inline] ocfs2_truncate_log_shutdown+0x118/0x284 fs/ocfs2/alloc.c:6343 ocfs2_dismount_volume+0x1f4/0x8cc fs/ocfs2/super.c:1827 ocfs2_put_super+0xec/0x320 fs/ocfs2/super.c:1553 generic_shutdown_super+0x12c/0x2b8 fs/super.c:642 kill_block_super+0x44/0x90 fs/super.c:1729 deactivate_locked_super+0xc4/0x12c fs/super.c:473 deactivate_super+0xe0/0x100 fs/super.c:506 cleanup_mnt+0x31c/0x3ac fs/namespace.c:1318 __cleanup_mnt+0x20/0x30 fs/namespace.c:1325 task_work_run+0x1dc/0x260 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x524/0x1a14 kernel/exit.c:966 do_group_exit+0x194/0x22c kernel/exit.c:1107 get_signal+0x11dc/0x12f8 kernel/signal.c:3034 arch_do_signal_or_restart+0x274/0x4414 arch/arm64/kernel/signal.c:1619 exit_to_user_mode_loop+0x7c/0x178 kernel/entry/common.c:40 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] arm64_exit_to_user_mode arch/arm64/kernel/entry-common.c:81 [inline] asm_exit_to_user_mode+0x13c/0x190 arch/arm64/kernel/entry-common.c:89 ret_from_fork+0x1c/0x20 arch/arm64/kernel/entry.S:844 Code: 17ffff1e 97951b7c d4210000 97951b7a (d4210000) ---[ end trace 0000000000000000 ]---