[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250923064015.178554-2-sidharthseela@gmail.com>
Date: Tue, 23 Sep 2025 12:10:16 +0530
From: Sidharth Seela <sidharthseela@...il.com>
To: almaz.alexandrovich@...agon-software.com
Cc: ntfs3@...ts.linux.dev,
linux-kernel@...r.kernel.org,
syzbot+332bd4e9d148f11a87dc@...kaller.appspotmail.com,
sidharthseela@...il.com
Subject: [PATCH v1] ntfs3: Fix uninit buffer allocated by __getname()
Fix uninit errors caused after buffer allocation given to 'de'; by
initializing the buffer with zeroes. The fix was found by using KMSAN.
Reported-by: syzbot+332bd4e9d148f11a87dc@...kaller.appspotmail.com
Fixes: 78ab59fee07f2 ("fs/ntfs3: Rework file operations")
Signed-off-by: Sidharth Seela <sidharthseela@...il.com>
--
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
index 37cbbee7fa58..6b14c13bda68 100644
--- a/fs/ntfs3/inode.c
+++ b/fs/ntfs3/inode.c
@@ -1716,6 +1716,7 @@ int ntfs_link_inode(struct inode *inode, struct dentry *dentry)
de = __getname();
if (!de)
return -ENOMEM;
+ memset(de, 0, PATH_MAX);
/* Mark rw ntfs as dirty. It will be cleared at umount. */
ntfs_set_state(sbi, NTFS_DIRTY_DIRTY);
--
2.47.3
Powered by blists - more mailing lists