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 91D3915CAE for ; Tue, 8 Nov 2022 14:16:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D667C433D6; Tue, 8 Nov 2022 14:16:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1667917009; bh=xagrSF2YagiIJpK5MGirqtwaIYU9PFe+RhfGGz5UWYE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VAIbsZoc6j9vfCnliH4RabKCDPoedJw0krK285CldPHL/BW+celI+j0AYK72naWzD SJEr8eaM6tqTgEUnAZNv2/rxprba1Ta+0tkPLWHK99qoBrSlG8WX124JANMLRioIdD zR6tIyTNXhvAs5FDIKCQXlCStoHptRMFyIi/Y/kw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Paulo Alcantara (SUSE)" , Ronnie Sahlberg , Steve French Subject: [PATCH 6.0 189/197] cifs: fix regression in very old smb1 mounts Date: Tue, 8 Nov 2022 14:40:27 +0100 Message-Id: <20221108133403.481038475@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221108133354.787209461@linuxfoundation.org> References: <20221108133354.787209461@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: Ronnie Sahlberg commit 2f6f19c7aaad5005dc75298a413eb0243c5d312d upstream. BZ: 215375 Fixes: 76a3c92ec9e0 ("cifs: remove support for NTLM and weaker authentication algorithms") Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman --- fs/cifs/connect.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -3921,12 +3921,11 @@ CIFSTCon(const unsigned int xid, struct pSMB->AndXCommand = 0xFF; pSMB->Flags = cpu_to_le16(TCON_EXTENDED_SECINFO); bcc_ptr = &pSMB->Password[0]; - if (tcon->pipe || (ses->server->sec_mode & SECMODE_USER)) { - pSMB->PasswordLength = cpu_to_le16(1); /* minimum */ - *bcc_ptr = 0; /* password is null byte */ - bcc_ptr++; /* skip password */ - /* already aligned so no need to do it below */ - } + + pSMB->PasswordLength = cpu_to_le16(1); /* minimum */ + *bcc_ptr = 0; /* password is null byte */ + bcc_ptr++; /* skip password */ + /* already aligned so no need to do it below */ if (ses->server->sign) smb_buffer->Flags2 |= SMBFLG2_SECURITY_SIGNATURE;