Skip to content

Commit a152d05

Browse files
vlendecSteve French
authored andcommitted
cifs: Fix uninitialized memory read for smb311 posix symlink create
If smb311 posix is enabled, we send the intended mode for file creation in the posix create context. Instead of using what's there on the stack, create the mfsymlink file with 0644. Fixes: ce558b0 ("smb3: Add posix create context for smb3.11 posix mounts") Cc: stable@vger.kernel.org Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Tom Talpey <tom@talpey.com> Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz> Signed-off-by: Steve French <stfrench@microsoft.com>
1 parent 2fe58d9 commit a152d05

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/cifs/link.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,7 @@ smb3_create_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
428428
oparms.disposition = FILE_CREATE;
429429
oparms.fid = &fid;
430430
oparms.reconnect = false;
431+
oparms.mode = 0644;
431432

432433
rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL,
433434
NULL, NULL);

0 commit comments

Comments
 (0)