Re: [syzbot] [fuse?] KMSAN: uninit-value in fuse_fileattr_get

From: Edward Adam Davis

Date: Fri Feb 06 2026 - 00:51:12 EST


#syz test

diff --git a/fs/file_attr.c b/fs/file_attr.c
index 13cdb31a3e94..4889cf59b256 100644
--- a/fs/file_attr.c
+++ b/fs/file_attr.c
@@ -377,7 +377,7 @@ SYSCALL_DEFINE5(file_getattr, int, dfd, const char __user *, filename,
struct filename *name __free(putname) = NULL;
unsigned int lookup_flags = 0;
struct file_attr fattr;
- struct file_kattr fa;
+ struct file_kattr fa = { .flags_valid = true }; /* hint only */
int error;

BUILD_BUG_ON(sizeof(struct file_attr) < FILE_ATTR_SIZE_VER0);