syzbot


KMSAN: uninit-value in __try_merge_extent_node

Status: upstream: reported on 2025/06/18 21:22
Subsystems: f2fs
[Documentation on labels]
Reported-by: syzbot+b8c1d60e95df65e827d4@syzkaller.appspotmail.com
First crash: 5d09h, last: 5d09h
Discussions (3)
Title Replies (including bot) Last reply
[PATCH v2] f2fs: fix KMSAN uninit-value in extent_info usage 1 (1) 2025/06/19 12:09
[PATCH] f2fs: fix KMSAN uninit-value in extent_info usage 1 (1) 2025/06/19 11:14
[syzbot] [f2fs?] KMSAN: uninit-value in __try_merge_extent_node 0 (1) 2025/06/18 21:22

Sample crash report:
loop8: detected capacity change from 0 to 131072
F2FS-fs (loop8): Mounted with checkpoint version = 48b305e5
=====================================================
BUG: KMSAN: uninit-value in __is_extent_mergeable fs/f2fs/extent_cache.c:154 [inline]
BUG: KMSAN: uninit-value in __is_back_mergeable fs/f2fs/extent_cache.c:173 [inline]
BUG: KMSAN: uninit-value in __try_merge_extent_node+0x415/0x1600 fs/f2fs/extent_cache.c:546
 __is_extent_mergeable fs/f2fs/extent_cache.c:154 [inline]
 __is_back_mergeable fs/f2fs/extent_cache.c:173 [inline]
 __try_merge_extent_node+0x415/0x1600 fs/f2fs/extent_cache.c:546
 __update_extent_tree_range+0x1b53/0x2ae0 fs/f2fs/extent_cache.c:776
 __update_extent_cache+0x11cc/0x1420 fs/f2fs/extent_cache.c:950
 f2fs_update_read_extent_cache+0x20/0x30 fs/f2fs/extent_cache.c:1055
 f2fs_update_data_blkaddr+0x428/0x470 fs/f2fs/data.c:1142
 f2fs_outplace_write_data+0x1bf/0x250 fs/f2fs/segment.c:4011
 f2fs_do_write_data_page+0x2a11/0x3480 fs/f2fs/data.c:2752
 f2fs_write_single_data_page+0x15bf/0x29b0 fs/f2fs/data.c:2868
 f2fs_write_cache_pages fs/f2fs/data.c:3133 [inline]
 __f2fs_write_data_pages fs/f2fs/data.c:3282 [inline]
 f2fs_write_data_pages+0x2f66/0x5480 fs/f2fs/data.c:3309
 do_writepages+0x3f2/0x860 mm/page-writeback.c:2636
 filemap_fdatawrite_wbc mm/filemap.c:386 [inline]
 __filemap_fdatawrite_range mm/filemap.c:419 [inline]
 file_write_and_wait_range+0x6f0/0x7d0 mm/filemap.c:794
 f2fs_do_sync_file+0x79b/0x31c0 fs/f2fs/file.c:278
 f2fs_sync_file+0x107/0x180 fs/f2fs/file.c:395
 vfs_fsync_range+0x1a1/0x240 fs/sync.c:187
 generic_write_sync include/linux/fs.h:3027 [inline]
 f2fs_file_write_iter+0x3032/0x4650 fs/f2fs/file.c:5203
 do_iter_readv_writev+0x947/0xba0 fs/read_write.c:-1
 vfs_writev+0x52a/0x1500 fs/read_write.c:1057
 do_pwritev fs/read_write.c:1153 [inline]
 __do_sys_pwritev2 fs/read_write.c:1211 [inline]
 __se_sys_pwritev2+0x22f/0x480 fs/read_write.c:1202
 __x64_sys_pwritev2+0xe4/0x150 fs/read_write.c:1202
 x64_sys_call+0x22b9/0x3db0 arch/x86/include/generated/asm/syscalls_64.h:329
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Local variable ei created at:
 f2fs_init_read_extent_tree+0xe7/0xf10 fs/f2fs/extent_cache.c:417
 do_read_inode fs/f2fs/inode.c:541 [inline]
 f2fs_iget+0x7a0e/0x8950 fs/f2fs/inode.c:589

CPU: 1 UID: 0 PID: 24362 Comm: syz.8.5691 Not tainted 6.16.0-rc1-syzkaller-00203-g4774cfe3543a #0 PREEMPT(undef) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
=====================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/14 21:11 upstream 4774cfe3543a 5f4b362d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in __try_merge_extent_node
* Struck through repros no longer work on HEAD.