From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7F010BA49 for ; Tue, 7 Mar 2023 18:33:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDF8EC4339B; Tue, 7 Mar 2023 18:33:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678214037; bh=uwtSjLBb7hT1blFUiP26qjx5yG7P0Jf5dKByOF6/nnI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t3NwxTX0JeNKLH6YRPlSxSBOPAGSldPdF3GFVSxyOhFh5WLgOXRm55W63SUe/IA9A a00FbGoxBD7SibnKjayfP+ne0zQZCNjhy5S6R5X2to3fWj81hnQmna+1d0lF15pIxM cyfDdRhhGJ9ddwX9VWaKQhmjUjueKYjupQ97Rvo8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Volker Lendecke , "Paulo Alcantara (SUSE)" , Steve French Subject: [PATCH 6.1 670/885] cifs: Fix uninitialized memory read in smb3_qfs_tcon() Date: Tue, 7 Mar 2023 18:00:04 +0100 Message-Id: <20230307170031.266533880@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230307170001.594919529@linuxfoundation.org> References: <20230307170001.594919529@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Volker Lendecke commit d447e794a37288ec7a080aa1b044a8d9deebbab7 upstream. oparms was not fully initialized Signed-off-by: Volker Lendecke Reviewed-by: Paulo Alcantara (SUSE) Cc: stable@vger.kernel.org Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman --- fs/cifs/smb2ops.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -729,12 +729,13 @@ smb3_qfs_tcon(const unsigned int xid, st struct cifs_fid fid; struct cached_fid *cfid = NULL; - oparms.tcon = tcon; - oparms.desired_access = FILE_READ_ATTRIBUTES; - oparms.disposition = FILE_OPEN; - oparms.create_options = cifs_create_options(cifs_sb, 0); - oparms.fid = &fid; - oparms.reconnect = false; + oparms = (struct cifs_open_parms) { + .tcon = tcon, + .desired_access = FILE_READ_ATTRIBUTES, + .disposition = FILE_OPEN, + .create_options = cifs_create_options(cifs_sb, 0), + .fid = &fid, + }; rc = open_cached_dir(xid, tcon, "", cifs_sb, false, &cfid); if (rc == 0)