================================================================== BUG: KASAN: use-after-free in ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5958 [inline] BUG: KASAN: use-after-free in __ocfs2_flush_truncate_log+0x7bc/0x1110 fs/ocfs2/alloc.c:6052 Read of size 4 at addr ffff8880686f2530 by task syz-executor/4187 CPU: 0 PID: 4187 Comm: syz-executor Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 print_address_description+0x60/0x2d0 mm/kasan/report.c:248 __kasan_report mm/kasan/report.c:434 [inline] kasan_report+0xdf/0x130 mm/kasan/report.c:451 ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5958 [inline] __ocfs2_flush_truncate_log+0x7bc/0x1110 fs/ocfs2/alloc.c:6052 ocfs2_flush_truncate_log+0x4b/0x60 fs/ocfs2/alloc.c:6074 ocfs2_sync_fs+0x119/0x330 fs/ocfs2/super.c:403 sync_filesystem+0x1be/0x220 fs/sync.c:66 generic_shutdown_super+0x6b/0x300 fs/super.c:448 kill_block_super+0x7c/0xe0 fs/super.c:1438 deactivate_locked_super+0x93/0xf0 fs/super.c:335 cleanup_mnt+0x426/0x4d0 fs/namespace.c:1148 task_work_run+0x125/0x1a0 kernel/task_work.c:188 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop+0x10f/0x130 kernel/entry/common.c:181 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:214 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline] syscall_exit_to_user_mode+0x16/0x40 kernel/entry/common.c:307 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7ff14a661317 Code: a2 c7 05 dc 43 25 00 00 00 00 00 eb 96 e8 e1 12 00 00 90 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 e8 ff ff ff f7 d8 64 89 02 b8 RSP: 002b:00007ffdb11f7288 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 00007ff14a6f6474 RCX: 00007ff14a661317 RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffdb11f7340 RBP: 00007ffdb11f7340 R08: 00007ffdb11f8340 R09: 00000000ffffffff R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffdb11f83d0 R13: 00007ff14a6f6474 R14: 000000000001525e R15: 00007ffdb11f8410 The buggy address belongs to the page: page:ffffea0001a1bc80 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x686f2 flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000000 ffffea0001a1bcc8 ffffea0001a1bc48 0000000000000000 raw: 0000000000000001 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 0x1100cca(GFP_HIGHUSER_MOVABLE), pid 4492, ts 86077200734, free_ts 86609624907 prep_new_page mm/page_alloc.c:2426 [inline] get_page_from_freelist+0x24f6/0x2670 mm/page_alloc.c:4192 __alloc_pages+0x1ee/0x480 mm/page_alloc.c:5501 alloc_pages_vma+0x2bc/0x790 mm/mempolicy.c:2146 shmem_alloc_page mm/shmem.c:1586 [inline] shmem_alloc_and_acct_page+0x47f/0xbe0 mm/shmem.c:1611 shmem_getpage_gfp+0x14be/0x2c10 mm/shmem.c:1906 shmem_fault+0x1ac/0x550 mm/shmem.c:2118 __do_fault+0x141/0x330 mm/memory.c:3928 do_read_fault mm/memory.c:4264 [inline] do_fault mm/memory.c:4392 [inline] handle_pte_fault mm/memory.c:4650 [inline] __handle_mm_fault mm/memory.c:4785 [inline] handle_mm_fault+0x2982/0x4440 mm/memory.c:4883 faultin_page mm/gup.c:976 [inline] __get_user_pages+0x952/0x11e0 mm/gup.c:1197 populate_vma_page_range+0x213/0x290 mm/gup.c:1529 __mm_populate+0x275/0x3b0 mm/gup.c:1638 mm_populate include/linux/mm.h:2646 [inline] vm_mmap_pgoff+0x212/0x2d0 mm/util.c:556 ksys_mmap_pgoff+0x140/0x790 mm/mmap.c:1635 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1340 [inline] free_pcp_prepare mm/page_alloc.c:1391 [inline] free_unref_page_prepare+0x637/0x6c0 mm/page_alloc.c:3317 free_unref_page_list+0x119/0x830 mm/page_alloc.c:3433 release_pages+0x185f/0x1bd0 mm/swap.c:963 __pagevec_release+0x6d/0xe0 mm/swap.c:983 pagevec_release include/linux/pagevec.h:81 [inline] shmem_undo_range+0x5cd/0x19a0 mm/shmem.c:964 shmem_truncate_range mm/shmem.c:1063 [inline] shmem_evict_inode+0x1e2/0x9a0 mm/shmem.c:1145 evict+0x4b6/0x8b0 fs/inode.c:647 __dentry_kill+0x412/0x630 fs/dcache.c:586 dentry_kill+0xb8/0x290 fs/dcache.c:-1 dput+0xd8/0x1a0 fs/dcache.c:893 __fput+0x5a5/0x8c0 fs/file_table.c:319 task_work_run+0x125/0x1a0 kernel/task_work.c:188 exit_task_work include/linux/task_work.h:33 [inline] do_exit+0x635/0x2110 kernel/exit.c:890 do_group_exit+0x12c/0x2f0 kernel/exit.c:1004 __do_sys_exit_group kernel/exit.c:1015 [inline] __se_sys_exit_group kernel/exit.c:1013 [inline] __x64_sys_exit_group+0x3b/0x40 kernel/exit.c:1013 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 Memory state around the buggy address: ffff8880686f2400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880686f2480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8880686f2500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff8880686f2580: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880686f2600: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ==================================================================