KASAN: use-after-free Read in ocfs2_search_extent_list

Status: upstream: reported C repro on 2026/10/22 10:26
Reported-by: syzbot+723c12b7bf2277f6f081@syzkaller.appspotmail.com
First crash: 17d, last: 17d
▶ ▼ Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in ocfs2_search_extent_list ocfs2 19 syz, C inconclusive 3 669d 699d 28/29 fixed on 2025/05/06 15:33

Sample crash report:
loop0: detected capacity change from 0 to 32768
JBD2: Ignoring recovery information on journal
==================================================================
BUG: KASAN: use-after-free in ocfs2_search_extent_list+0x150/0x1d4 fs/ocfs2/alloc.c:776
Read of size 4 at addr ffff0000f101b000 by task syz.0.21/4555

CPU: 1 PID: 4555 Comm: syz.0.21 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/14/2026
Call trace:
 dump_backtrace+0x1c4/0x1f0 arch/arm64/kernel/stacktrace.c:158
 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165
 __dump_stack+0x30/0x40 lib/dump_stack.c:88
 dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106
 print_address_description+0x88/0x218 mm/kasan/report.c:316
 print_report+0x50/0x68 mm/kasan/report.c:420
 kasan_report+0xa8/0xfc mm/kasan/report.c:524
 __asan_report_load4_noabort+0x2c/0x38 mm/kasan/report_generic.c:350
 ocfs2_search_extent_list+0x150/0x1d4 fs/ocfs2/alloc.c:776
 ocfs2_get_clusters_nocache+0x188/0x924 fs/ocfs2/extent_map.c:438
 ocfs2_get_clusters+0x418/0x85c fs/ocfs2/extent_map.c:621
 ocfs2_extent_map_get_blocks+0x194/0x570 fs/ocfs2/extent_map.c:668
 ocfs2_bmap+0x2bc/0x730 fs/ocfs2/aops.c:479
 bmap+0xa8/0xe8 fs/inode.c:1885
 jbd2_journal_bmap+0xf8/0x214 fs/jbd2/journal.c:981
 do_readahead fs/jbd2/recovery.c:86 [inline]
 jread+0x268/0x84c fs/jbd2/recovery.c:163
 do_one_pass+0x248/0x2b7c fs/jbd2/recovery.c:531
 jbd2_journal_skip_recovery+0x54/0x150 fs/jbd2/recovery.c:366
 jbd2_journal_wipe+0x380/0x4f4 fs/jbd2/journal.c:2563
 ocfs2_journal_wipe+0xac/0x280 fs/ocfs2/journal.c:1182
 ocfs2_check_volume fs/ocfs2/super.c:2416 [inline]
 ocfs2_mount_volume+0x894/0x126c fs/ocfs2/super.c:1819
 ocfs2_fill_super+0x2d70/0x417c fs/ocfs2/super.c:1082
 mount_bdev+0x264/0x35c fs/super.c:1454
 ocfs2_mount+0x44/0x58 fs/ocfs2/super.c:1186
 legacy_get_tree+0xd8/0x174 fs/fs_context.c:632
 vfs_get_tree+0x90/0x278 fs/super.c:1584
 do_new_mount+0x228/0x804 fs/namespace.c:3078
 path_mount+0x5ac/0xe6c fs/namespace.c:3408
 do_mount fs/namespace.c:3421 [inline]
 __do_sys_mount fs/namespace.c:3629 [inline]
 __se_sys_mount fs/namespace.c:3606 [inline]
 __arm64_sys_mount+0x4a0/0x5a0 fs/namespace.c:3606
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140
 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204
 el0_svc+0x58/0x12c arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585

The buggy address belongs to the physical page:
page:00000000c63d6e57 refcount:0 mapcount:0 mapping:0000000000000000 index:0x1 pfn:0x13101b
flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff)
raw: 05ffc00000000000 fffffc0003c40708 ffff00019e0fe060 0000000000000000
raw: 0000000000000001 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff0000f101af00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff0000f101af80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff0000f101b000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                   ^
 ffff0000f101b080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff0000f101b100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
jbd2_journal_bmap: journal block not found at offset 32 on loop0-75
JBD2: bad block at offset 32
(syz.0.21,4555,1):ocfs2_load_local_alloc:311 ERROR: Invalid local alloc inode, 75
(syz.0.21,4555,1):ocfs2_load_local_alloc:355 ERROR: status = -22
(syz.0.21,4555,1):ocfs2_check_volume:2459 ERROR: status = -22
(syz.0.21,4555,1):ocfs2_check_volume:2487 ERROR: status = -22
(syz.0.21,4555,1):ocfs2_mount_volume:1821 ERROR: status = -22
(syz.0.21,4555,1):ocfs2_fill_super:1176 ERROR: status = -22

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/22 10:26 linux-6.1.y 79807e970724 4ba27f85 .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (clean fs)] ci2-linux-6-1-kasan-arm64 KASAN: use-after-free Read in ocfs2_search_extent_list
* Struck through repros no longer work on HEAD.