Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 57f78226 authored by Volker Lendecke's avatar Volker Lendecke Committed by Greg Kroah-Hartman
Browse files

cifs: Fix uninitialized memory read in smb3_qfs_tcon()



[ Upstream commit d447e794a37288ec7a080aa1b044a8d9deebbab7 ]

oparms was not fully initialized

Signed-off-by: default avatarVolker Lendecke <vl@samba.org>
Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a6e44cb2
Loading
Loading
Loading
Loading
+7 −6
Original line number Original line Diff line number Diff line
@@ -823,12 +823,13 @@ smb3_qfs_tcon(const unsigned int xid, struct cifs_tcon *tcon,
	struct cifs_fid fid;
	struct cifs_fid fid;
	bool no_cached_open = tcon->nohandlecache;
	bool no_cached_open = tcon->nohandlecache;


	oparms.tcon = tcon;
	oparms = (struct cifs_open_parms) {
	oparms.desired_access = FILE_READ_ATTRIBUTES;
		.tcon = tcon,
	oparms.disposition = FILE_OPEN;
		.desired_access = FILE_READ_ATTRIBUTES,
	oparms.create_options = cifs_create_options(cifs_sb, 0);
		.disposition = FILE_OPEN,
	oparms.fid = &fid;
		.create_options = cifs_create_options(cifs_sb, 0),
	oparms.reconnect = false;
		.fid = &fid,
	};


	if (no_cached_open)
	if (no_cached_open)
		rc = SMB2_open(xid, &oparms, &srch_path, &oplock, NULL, NULL,
		rc = SMB2_open(xid, &oparms, &srch_path, &oplock, NULL, NULL,