* [PATCH v1] ntfs3: Fix uninit buffer allocated by __getname()
@ 2025-09-23 6:40 Sidharth Seela
2025-11-20 8:47 ` Konstantin Komarov
0 siblings, 1 reply; 2+ messages in thread
From: Sidharth Seela @ 2025-09-23 6:40 UTC (permalink / raw)
To: almaz.alexandrovich
Cc: ntfs3, linux-kernel, syzbot+332bd4e9d148f11a87dc, sidharthseela
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>
--
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] ntfs3: Fix uninit buffer allocated by __getname()
2025-09-23 6:40 [PATCH v1] ntfs3: Fix uninit buffer allocated by __getname() Sidharth Seela
@ 2025-11-20 8:47 ` Konstantin Komarov
0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Komarov @ 2025-11-20 8:47 UTC (permalink / raw)
To: Sidharth Seela; +Cc: ntfs3, linux-kernel, syzbot+332bd4e9d148f11a87dc
On 9/23/25 08:40, Sidharth Seela wrote:
> 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>
>
> --
>
> 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);
Patch looks good — applied. Thanks.
Regards,
Konstantin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-20 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-23 6:40 [PATCH v1] ntfs3: Fix uninit buffer allocated by __getname() Sidharth Seela
2025-11-20 8:47 ` Konstantin Komarov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox