diff options
author | Volker Lendecke <[email protected]> | 2023-01-11 12:37:58 +0100 |
---|---|---|
committer | Steve French <[email protected]> | 2023-01-12 09:51:48 -0600 |
commit | a152d05ae4a71d802d50cf9177dba34e8bb09f68 (patch) | |
tree | e2fa322baa74c92ba1a3c2a72f32071912a5b4c9 | |
parent | 2fe58d977ee05da5bb89ef5dc4f5bf2dc15db46f (diff) |
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: ce558b0e17f8a ("smb3: Add posix create context for smb3.11 posix mounts")
Cc: [email protected]
Signed-off-by: Volker Lendecke <[email protected]>
Reviewed-by: Tom Talpey <[email protected]>
Reviewed-by: Paulo Alcantara (SUSE) <[email protected]>
Signed-off-by: Steve French <[email protected]>
-rw-r--r-- | fs/cifs/link.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index bd374feeccaa..a5a097a69983 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c @@ -428,6 +428,7 @@ smb3_create_mf_symlink(unsigned int xid, struct cifs_tcon *tcon, oparms.disposition = FILE_CREATE; oparms.fid = &fid; oparms.reconnect = false; + oparms.mode = 0644; rc = SMB2_open(xid, &oparms, utf16_path, &oplock, NULL, NULL, NULL, NULL); |