summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSidharth Seela <sidharthseela@gmail.com>2025-09-23 12:10:16 +0530
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2025-10-17 16:45:38 +0200
commit9948dcb2f7b5a1bf8e8710eafaf6016e00be3ad6 (patch)
tree5761caaccafee7169de607818db69bb9ddb7330b
parent73e6b9dacf72a1e7a4265eacca46f8f33e0997d6 (diff)
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@syzkaller.appspotmail.com Fixes: 78ab59fee07f2 ("fs/ntfs3: Rework file operations") Signed-off-by: Sidharth Seela <sidharthseela@gmail.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
-rw-r--r--fs/ntfs3/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ntfs3/inode.c b/fs/ntfs3/inode.c
index b741a697e572..439078106cc6 100644
--- a/fs/ntfs3/inode.c
+++ b/fs/ntfs3/inode.c
@@ -1725,6 +1725,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);