Skip to content

Commit 9948dcb

Browse files
sidharth-458aalexandrovich
authored andcommitted
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: 78ab59f ("fs/ntfs3: Rework file operations") Signed-off-by: Sidharth Seela <sidharthseela@gmail.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
1 parent 73e6b9d commit 9948dcb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/ntfs3/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,6 +1725,7 @@ int ntfs_link_inode(struct inode *inode, struct dentry *dentry)
17251725
de = __getname();
17261726
if (!de)
17271727
return -ENOMEM;
1728+
memset(de, 0, PATH_MAX);
17281729

17291730
/* Mark rw ntfs as dirty. It will be cleared at umount. */
17301731
ntfs_set_state(sbi, NTFS_DIRTY_DIRTY);

0 commit comments

Comments
 (0)