All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ntfs3: fix info-leak in ntfs_rename()
@ 2026-06-09 12:36 Dmitry Antipov
  2026-06-09 20:19 ` Al Viro
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Antipov @ 2026-06-09 12:36 UTC (permalink / raw)
  To: Konstantin Komarov
  Cc: Al Viro, ntfs3, lvc-project, Dmitry Antipov,
	syzbot+905d785c4923bea2c1db

In 'ntfs_rename()', buffer passed to 'fill_name_de()' should
be allocated with 'kzalloc()' to avoid exposing contents of
an uninitialized kernel memory via 'copy_to_user_iter()'.

Reported-by: syzbot+905d785c4923bea2c1db@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=905d785c4923bea2c1db
Fixes: ca2a04e84af7 ("ntfs: ->d_compare() must not block")
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 fs/ntfs3/namei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ntfs3/namei.c b/fs/ntfs3/namei.c
index b2af8f695e60..74fe002214f3 100644
--- a/fs/ntfs3/namei.c
+++ b/fs/ntfs3/namei.c
@@ -303,7 +303,7 @@ static int ntfs_rename(struct mnt_idmap *idmap, struct inode *dir,
 			return err;
 	}
 
-	de = kmalloc(PATH_MAX, GFP_KERNEL);
+	de = kzalloc(PATH_MAX, GFP_KERNEL);
 	if (!de)
 		return -ENOMEM;
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-09 23:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09 12:36 [PATCH] ntfs3: fix info-leak in ntfs_rename() Dmitry Antipov
2026-06-09 20:19 ` Al Viro
2026-06-09 23:08   ` Al Viro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.