]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: Fix uninitialized memory read for smb311 posix symlink create
authorVolker Lendecke <vl@samba.org>
Wed, 11 Jan 2023 11:37:58 +0000 (12:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:42:01 +0000 (11:42 +0100)
commit2c426c8fdd7d2c5d4710e5d3904f2beac671b006
tree3c26741a5665749a73fb5c2c15091387b7bcce3a
parent0a999ae82eafed01633e7063aad6e6bc51c91e48
cifs: Fix uninitialized memory read for smb311 posix symlink create

commit a152d05ae4a71d802d50cf9177dba34e8bb09f68 upstream.

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: 9244fc87510ee ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/link.c