aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2019-12-09 22:34:10 -0600
committerSteve French <stfrench@microsoft.com>2019-12-13 00:49:38 -0600
commite0fc5b1153b81571d6ff80902a54c3eb13319b33 (patch)
tree76c6262475b2accd47cdea53a80efcd5e187bcf9 /fs
parentsmb3: fix refcount underflow warning on unmount when no directory leases (diff)
downloadlinux-dev-e0fc5b1153b81571d6ff80902a54c3eb13319b33.tar.xz
linux-dev-e0fc5b1153b81571d6ff80902a54c3eb13319b33.zip
SMB3: Fix crash in SMB2_open_init due to uninitialized field in compounding path
Ran into an intermittent crash in SMB2_open_init+0x2f6/0x970 due to oparms.cifs_sb not being initialized when called from: smb2_compound_op+0x45d/0x1690 Zero the whole oparms struct in the compounding path before setting up the oparms so we don't risk any uninitialized fields. Fixes: fdef665ba44a ("smb3: fix mode passed in on create for modetosid mount option") Signed-off-by: Steve French <stfrench@microsoft.com> Acked-by: Ronnie Sahlberg <lsahlber@redhat.com> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/smb2inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/smb2inode.c b/fs/cifs/smb2inode.c
index 18c7a33adceb..5ef5e97a6d13 100644
--- a/fs/cifs/smb2inode.c
+++ b/fs/cifs/smb2inode.c
@@ -95,6 +95,7 @@ smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
goto finished;
}
+ memset(&oparms, 0, sizeof(struct cifs_open_parms));
oparms.tcon = tcon;
oparms.desired_access = desired_access;
oparms.disposition = create_disposition;