Fwd: patch for stable "cifs: fix regression in very old smb1 mounts"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---------- Forwarded message ---------
From: Steve French <smfrench@xxxxxxxxx>
Date: Mon, Nov 7, 2022 at 5:54 PM
Subject: patch for stable "cifs: fix regression in very old smb1 mounts"
To: Stable <stable@xxxxxxxxxxxxxxx>
Cc: CIFS <linux-cifs@xxxxxxxxxxxxxxx>, Thorsten Leemhuis
<regressions@xxxxxxxxxxxxx>, ronnie sahlberg
<ronniesahlberg@xxxxxxxxx>


commit 2f6f19c7aaad "cifs: fix regression in very old smb1 mounts" upstream

Also attached upstream commit.

For 5.15 and 6.0 stable kernels





-- 
Thanks,

Steve


-- 
Thanks,

Steve
From 2f6f19c7aaad5005dc75298a413eb0243c5d312d Mon Sep 17 00:00:00 2001
From: Ronnie Sahlberg <lsahlber@redhat.com>
Date: Wed, 12 Oct 2022 09:12:07 +1000
Subject: [PATCH] cifs: fix regression in very old smb1 mounts

BZ: 215375

Fixes: 76a3c92ec9e0 ("cifs: remove support for NTLM and weaker authentication algorithms")
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
---
 fs/cifs/connect.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 40900aace416..e158257da1cd 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3922,12 +3922,11 @@ CIFSTCon(const unsigned int xid, struct cifs_ses *ses,
 	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;
-- 
2.34.1


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux