From: Marios Makassikis <mmakassikis@freebox.fr>
To: linux-cifs@vger.kernel.org, linkinjeon@kernel.org
Cc: smfrench@gmail.com, tom@talpey.com, senozhatsky@chromium.org,
Marios Makassikis <mmakassikis@freebox.fr>
Subject: [PATCH] fs: smb: server: zero buffer before filling file entry
Date: Wed, 22 Apr 2026 12:50:11 +0200 [thread overview]
Message-ID: <20260422105010.2600337-2-mmakassikis@freebox.fr> (raw)
this ensures there is no stale data in padding area between entries
when processing SMB2_QUERY_DIRECTORY request.
Signed-off-by: Marios Makassikis <mmakassikis@freebox.fr>
---
fs/smb/server/smb2pdu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
index 07782f7205dc..b55bef96d94b 100644
--- a/fs/smb/server/smb2pdu.c
+++ b/fs/smb/server/smb2pdu.c
@@ -3962,6 +3962,7 @@ static int smb2_populate_readdir_entry(struct ksmbd_conn *conn, int info_level,
rc = -ENOSPC;
goto free_conv_name;
}
+ memset(d_info->wptr, 0, next_entry_offset);
kstat = d_info->wptr;
if (info_level != FILE_NAMES_INFORMATION)
--
2.51.1
next reply other threads:[~2026-04-22 10:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-22 10:50 Marios Makassikis [this message]
2026-04-23 0:29 ` [PATCH] fs: smb: server: zero buffer before filling file entry Namjae Jeon
2026-04-28 8:04 ` Marios Makassikis
2026-04-28 12:17 ` Namjae Jeon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260422105010.2600337-2-mmakassikis@freebox.fr \
--to=mmakassikis@freebox.fr \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=senozhatsky@chromium.org \
--cc=smfrench@gmail.com \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).