Skip to contentSkip to conversation

CIFS: attempt to fix kernel bugzilla 215375

PATCH New Ronnie Sahlberg 3 participants 4 messages Sep 6, 2022 – Oct 11, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Steve,
Here is an attempt to fix kernel bz 215375.
I can not test it, since I don't have access to servers this old but the change should be safe for modern users as it only affects the password field for "share mode" security, which we do not support anyway.

It is only tested for regressions with user mode security on win98 and later systems, using ntlmssp authentication.

#1 lore raw

PATCH 1/1 cifs: fix buf in smb1 tree connect where we mount a share without suer security

Unconditionally alway set an empty password (length 1) for SMB1 Tree Connect password.

---
 fs/cifs/connect.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
fs/cifs/connect.c +5 -6
index 3da5da9f16b0..cab1be85dfa4 100644
@@ -3926,12 +3926,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;
Signature · 1 line
2.35.3
#2 lore raw
In reply to Ronnie Sahlberg

Any thoughts about setting up VMs for Win98 to try this? Any luck trying to test with the fix?

Quoted 12 lines · Ronnie Sahlberg

Steve,
Here is an attempt to fix kernel bz 215375.
I can not test it, since I don't have access to servers this old but the change should be safe for modern users as it only affects the password field for "share mode" security, which we do not support anyway.

It is only tested for regressions with user mode security on win98 and later systems, using ntlmssp authentication.

Signature · 3 lines
Thanks,

Steve
#3 lore raw
Quoted 2 lines · Steve French

Any thoughts about setting up VMs for Win98 to try this? Any luck trying to test with the fix?

Ronnie, Steve, any news on that patch and a way forward? More and more users are showing up in
https://bugzilla.kernel.org/show_bug.cgi?id=215375 and complain about this regression. :-/ At least one of them apparently tested the patch now successfully: https://bugzilla.kernel.org/show_bug.cgi?id=215375#c43

Ciao, Thorsten

Quoted 15 lines · Ronnie Sahlberg
Quoted 12 lines

Steve,
Here is an attempt to fix kernel bz 215375.
I can not test it, since I don't have access to servers this old but the change should be safe for modern users as it only affects the password field for "share mode" security, which we do not support anyway.

It is only tested for regressions with user mode security on win98 and later systems, using ntlmssp authentication.