syzbot


KMSAN: uninit-value in bch2_inode_flush_nocow_writes_async

Status: upstream: reported on 2024/05/30 08:46
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+917694e2e9db5284865f@syzkaller.appspotmail.com
First crash: 28d, last: 11d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] KMSAN: uninit-value in bch2_inode_flush_nocow_writes_async 0 (1) 2024/05/30 08:46

Sample crash report:
bcachefs (loop2): snapshots_read... done
bcachefs (loop2): journal_replay... done
bcachefs (loop2): resume_logged_ops... done
bcachefs (loop2): going read-write
bcachefs (loop2): done starting filesystem
=====================================================
BUG: KMSAN: uninit-value in find_first_bit include/linux/find.h:207 [inline]
BUG: KMSAN: uninit-value in bch2_inode_flush_nocow_writes_async+0x6bd/0x6f0 fs/bcachefs/fs-io.c:64
 find_first_bit include/linux/find.h:207 [inline]
 bch2_inode_flush_nocow_writes_async+0x6bd/0x6f0 fs/bcachefs/fs-io.c:64
 bch2_inode_flush_nocow_writes fs/bcachefs/fs-io.c:99 [inline]
 bch2_flush_inode+0x3d4/0x480 fs/bcachefs/fs-io.c:186
 bch2_fsync+0x1d1/0x2a0 fs/bcachefs/fs-io.c:203
 vfs_fsync_range+0x20d/0x270 fs/sync.c:188
 generic_write_sync include/linux/fs.h:2811 [inline]
 bch2_buffered_write fs/bcachefs/fs-io-buffered.c:1136 [inline]
 bch2_write_iter+0xe59/0x5b30 fs/bcachefs/fs-io-buffered.c:1144
 do_iter_readv_writev+0x7e6/0x960
 vfs_writev+0x574/0x1450 fs/read_write.c:971
 do_pwritev fs/read_write.c:1072 [inline]
 __do_sys_pwritev2 fs/read_write.c:1131 [inline]
 __se_sys_pwritev2+0x280/0x470 fs/read_write.c:1122
 __x64_sys_pwritev2+0x11f/0x1a0 fs/read_write.c:1122
 x64_sys_call+0x1146/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:329
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Uninit was created at:
 slab_post_alloc_hook mm/slub.c:3877 [inline]
 slab_alloc_node mm/slub.c:3918 [inline]
 kmem_cache_alloc+0x5b9/0xc20 mm/slub.c:3925
 bch2_alloc_inode+0x56/0x280 fs/bcachefs/fs.c:1497
 alloc_inode+0x86/0x460 fs/inode.c:261
 new_inode_pseudo fs/inode.c:1007 [inline]
 new_inode+0x38/0x4f0 fs/inode.c:1033
 bch2_new_inode+0xc8/0x290 fs/bcachefs/fs.c:224
 bch2_lookup_trans fs/bcachefs/fs.c:408 [inline]
 bch2_lookup+0x1993/0x1fc0 fs/bcachefs/fs.c:437
 lookup_open fs/namei.c:3483 [inline]
 open_last_lookups fs/namei.c:3574 [inline]
 path_openat+0x27a9/0x5b00 fs/namei.c:3804
 do_filp_open+0x20e/0x590 fs/namei.c:3834
 do_sys_openat2+0x1bf/0x2f0 fs/open.c:1406
 do_sys_open fs/open.c:1421 [inline]
 __do_sys_openat fs/open.c:1437 [inline]
 __se_sys_openat fs/open.c:1432 [inline]
 __x64_sys_openat+0x2a1/0x310 fs/open.c:1432
 x64_sys_call+0x3a64/0x3b50 arch/x86/include/generated/asm/syscalls_64.h:258
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

CPU: 1 PID: 9186 Comm: syz-executor.2 Not tainted 6.9.0-syzkaller-02707-g614da38e2f7a #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
=====================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/14 07:15 upstream 614da38e2f7a a9616ff5 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in bch2_inode_flush_nocow_writes_async
2024/06/11 18:07 upstream 614da38e2f7a c7d7d815 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in bch2_inode_flush_nocow_writes_async
2024/06/08 18:15 upstream 614da38e2f7a 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-root KMSAN: uninit-value in bch2_inode_flush_nocow_writes_async
2024/05/29 17:06 upstream 101b7a97143a 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in bch2_inode_flush_nocow_writes_async
2024/05/28 05:45 upstream 101b7a97143a f550015e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kmsan-gce-386-root KMSAN: uninit-value in bch2_inode_flush_nocow_writes_async
* Struck through repros no longer work on HEAD.