KASAN: use-after-free Read in __ocfs2_flush_truncate_log

Status: upstream: reported C repro on 2026/08/24 09:55
Reported-by: syzbot+bda9404892f443b26a67@syzkaller.appspotmail.com
First crash: 5d07h, last: 5d06h
Bug presence (1)
Date Name Commit Repro Result
2026/08/26 upstream (ToT) [unknown] C Failed due to an error; will retry later
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in __ocfs2_flush_truncate_log ocfs2 prio:high 19 syz, C inconclusive inconclusive 41 262d 699d 0/29 auto-obsoleted due to no activity on 2026/06/12 00:20
linux-5.15 KASAN: use-after-free Read in __ocfs2_flush_truncate_log origin:lts-only 19 syz, C error 6 3d08h 461d 0/3 upstream: reported C repro on 2025/05/25 11:09
linux-6.1 KASAN: use-after-free Read in __ocfs2_flush_truncate_log origin:lts-only 19 syz, C 11 3d06h 82d 0/3 upstream: reported C repro on 2026/06/07 20:02

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5959 [inline]
BUG: KASAN: use-after-free in __ocfs2_flush_truncate_log+0x7bc/0x1130 fs/ocfs2/alloc.c:6054
Read of size 4 at addr ffff888063fb0530 by task syz-executor/5898

CPU: 0 PID: 5898 Comm: syz-executor Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:364 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:468
 kasan_report+0x117/0x150 mm/kasan/report.c:581
 ocfs2_replay_truncate_records fs/ocfs2/alloc.c:5959 [inline]
 __ocfs2_flush_truncate_log+0x7bc/0x1130 fs/ocfs2/alloc.c:6054
 ocfs2_flush_truncate_log+0x4f/0x60 fs/ocfs2/alloc.c:6076
 ocfs2_sync_fs+0x11d/0x330 fs/ocfs2/super.c:402
 sync_filesystem+0x1c2/0x220 fs/sync.c:66
 generic_shutdown_super+0x6f/0x2b0 fs/super.c:666
 kill_block_super+0x44/0x90 fs/super.c:1668
 deactivate_locked_super+0x97/0x100 fs/super.c:481
 cleanup_mnt+0x3d7/0x460 fs/namespace.c:1259
 task_work_run+0x1d4/0x260 kernel/task_work.c:245
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177
 exit_to_user_mode_prepare+0xee/0x180 kernel/entry/common.c:210
 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
 syscall_exit_to_user_mode+0x1a/0x50 kernel/entry/common.c:302
 do_syscall_64+0x61/0xb0 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f505b59f317
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:00007fff77c95748 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 00007f505b634474 RCX: 00007f505b59f317
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007fff77c95800
RBP: 00007fff77c95800 R08: 00007fff77c96800 R09: 00000000ffffffff
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff77c96890
R13: 00007f505b634474 R14: 0000000000018616 R15: 00007fff77c968d0
 </TASK>

The buggy address belongs to the physical page:
page:ffffea00018fec00 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x63fb0
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 00fff00000000000 ffffea00018fec48 ffffea00018febc8 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 0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_COMP|__GFP_ZERO), pid 5790, tgid 5790 (syz-executor), ts 86805499239, free_ts 87455547909
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x1c1/0x200 mm/page_alloc.c:1582
 prep_new_page mm/page_alloc.c:1589 [inline]
 get_page_from_freelist+0x2181/0x22a0 mm/page_alloc.c:3221
 __alloc_pages+0x1f0/0x460 mm/page_alloc.c:4501
 __folio_alloc+0x10/0x20 mm/page_alloc.c:4533
 vma_alloc_folio+0x474/0x8f0 mm/mempolicy.c:2240
 do_anonymous_page mm/memory.c:4150 [inline]
 do_pte_missing mm/memory.c:3687 [inline]
 handle_pte_fault mm/memory.c:5047 [inline]
 __handle_mm_fault mm/memory.c:5188 [inline]
 handle_mm_fault+0x1ab6/0x4a50 mm/memory.c:5353
 do_user_addr_fault+0xad2/0x12d0 arch/x86/mm/fault.c:1322
 handle_page_fault arch/x86/mm/fault.c:1463 [inline]
 exc_page_fault+0x64/0x100 arch/x86/mm/fault.c:1516
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:608
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1182 [inline]
 free_unref_page_prepare+0x7d7/0x8f0 mm/page_alloc.c:2366
 free_unref_page_list+0xbe/0x860 mm/page_alloc.c:2505
 release_pages+0x208a/0x2300 mm/swap.c:1022
 tlb_batch_pages_flush mm/mmu_gather.c:99 [inline]
 tlb_flush_mmu_free mm/mmu_gather.c:294 [inline]
 tlb_flush_mmu+0x379/0x510 mm/mmu_gather.c:301
 tlb_finish_mmu+0xf4/0x220 mm/mmu_gather.c:425
 unmap_region+0x311/0x370 mm/mmap.c:2349
 do_vmi_align_munmap+0x1057/0x16a0 mm/mmap.c:2592
 do_vmi_munmap+0x252/0x2d0 mm/mmap.c:2660
 __vm_munmap+0x19e/0x3c0 mm/mmap.c:2961
 __do_sys_munmap mm/mmap.c:2978 [inline]
 __se_sys_munmap mm/mmap.c:2975 [inline]
 __x64_sys_munmap+0x60/0x70 mm/mmap.c:2975
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Memory state around the buggy address:
 ffff888063fb0400: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888063fb0480: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
>ffff888063fb0500: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                     ^
 ffff888063fb0580: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff888063fb0600: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/24 10:41 linux-6.6.y dc6160265ffc 1e72964b .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-linux-6-6-kasan KASAN: use-after-free Read in __ocfs2_flush_truncate_log
2026/08/24 10:41 linux-6.6.y dc6160265ffc 1e72964b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: use-after-free Read in __ocfs2_flush_truncate_log
2026/08/24 09:54 linux-6.6.y dc6160265ffc 1e72964b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan KASAN: use-after-free Read in __ocfs2_flush_truncate_log
* Struck through repros no longer work on HEAD.