syzbot


KMSAN: uninit-value in f2fs_new_node_page

Status: upstream: reported C repro on 2024/12/03 15:01
Subsystems: f2fs
[Documentation on labels]
Reported-by: syzbot+5141f6db57a2f7614352@syzkaller.appspotmail.com
Fix commit: f2fs: ensure that node info flags are always initialized
Patched on: [ci-upstream-linux-next-kasan-gce-root], missing on: [ci-qemu-gce-upstream-auto ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 21d, last: 2h25m
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] f2fs: ensure that node info flags are always initialized 5 (5) 2024/12/16 16:40
[syzbot] [f2fs?] KMSAN: uninit-value in f2fs_new_node_page 0 (3) 2024/12/12 18:03
Last patch testing requests (2)
Created Duration User Patch Repo Result
2024/12/12 18:03 28m dmantipov@yandex.ru patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 231825b2e1ff6ba799c5eaf396d3ab2354e37c6b OK log
2024/12/03 16:28 1h11m dmantipov@yandex.ru patch https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git cdd30ebb1b9f36159d66f088b61aee264e649d7a OK log

Sample crash report:
F2FS-fs (loop0): Mounted with checkpoint version = 48b305e5
F2FS-fs (loop0): f2fs_check_nid_range: out-of-range nid=1, run fsck to fix.
F2FS-fs (loop0): f2fs_check_nid_range: out-of-range nid=2, run fsck to fix.
=====================================================
BUG: KMSAN: uninit-value in f2fs_new_node_page+0x14c5/0x1690 fs/f2fs/node.c:1341
 f2fs_new_node_page+0x14c5/0x1690 fs/f2fs/node.c:1341
 f2fs_new_inode_page+0xb6/0x100 fs/f2fs/node.c:1311
 f2fs_init_inode_metadata+0x18b/0x1e40 fs/f2fs/dir.c:501
 f2fs_add_inline_entry+0x5f5/0xbe0 fs/f2fs/inline.c:665
 f2fs_add_dentry fs/f2fs/dir.c:742 [inline]
 f2fs_do_add_link+0x4b0/0xad0 fs/f2fs/dir.c:785
 f2fs_add_link fs/f2fs/f2fs.h:3628 [inline]
 f2fs_symlink+0x6d5/0xf80 fs/f2fs/namei.c:641
 vfs_symlink+0x1ed/0x460 fs/namei.c:4669
 do_symlinkat+0x253/0x8b0 fs/namei.c:4695
 __do_sys_symlink fs/namei.c:4716 [inline]
 __se_sys_symlink fs/namei.c:4714 [inline]
 __x64_sys_symlink+0xe0/0x140 fs/namei.c:4714
 x64_sys_call+0x31ca/0x3c30 arch/x86/include/generated/asm/syscalls_64.h:89
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Local variable new_ni created at:
 f2fs_new_node_page+0xa4/0x1690 fs/f2fs/node.c:1317
 f2fs_new_inode_page+0xb6/0x100 fs/f2fs/node.c:1311

CPU: 0 UID: 0 PID: 5782 Comm: syz-executor986 Not tainted 6.12.0-syzkaller-11930-g0e287d31b62b #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
=====================================================

Crashes (15):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/01 07:06 upstream 0e287d31b62b 68914665 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kmsan-gce-root KMSAN: uninit-value in f2fs_new_node_page
2024/12/20 00:05 upstream eabcdba3ad40 1d58202c .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in f2fs_new_node_page
2024/12/12 16:13 upstream 231825b2e1ff 941924eb .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in f2fs_new_node_page
2024/12/05 10:02 upstream feffde684ac2 29f61fce .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in f2fs_new_node_page
2024/12/04 04:46 upstream ceb8bf2ceaa7 b50eb251 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in f2fs_new_node_page
2024/12/01 09:55 upstream 0e287d31b62b 68914665 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in f2fs_new_node_page
2024/12/01 05:49 upstream 0e287d31b62b 68914665 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in f2fs_new_node_page
2024/12/21 12:12 upstream 499551201b5f d7f584ee .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in f2fs_new_node_page
2024/12/19 04:24 upstream c061cf420ded 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in f2fs_new_node_page
2024/12/19 04:18 upstream c061cf420ded 1432fc84 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in f2fs_new_node_page
2024/12/17 11:35 upstream f44d154d6e3d f93b2b55 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in f2fs_new_node_page
2024/12/16 20:21 upstream 78d4f34e2115 f93b2b55 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in f2fs_new_node_page
2024/12/16 08:14 upstream 78d4f34e2115 7cbfbb3a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in f2fs_new_node_page
2024/11/29 14:55 upstream 7af08b57bcb9 5df23865 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in f2fs_new_node_page
2024/11/29 14:54 upstream 7af08b57bcb9 5df23865 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in f2fs_new_node_page
* Struck through repros no longer work on HEAD.