Re: CIFS regression mounting vers=1.0 NTLMSSP when hostname is too long

From: Paulo Alcantara
Date: Wed May 04 2022 - 16:59:07 EST


Tom Talpey <tom@xxxxxxxxxx> writes:

> I think the most conservative and spec-compliant choice should be made.
> SMB1 should not be pushing the envelope of interoperability, in this day
> and age.

OK.

> I believe the NetBIOS name is a fixed array of 16 octets, right? So, if
> the nodename is shorter, it needs to be padded with 0's.

Right.

> Did this code change recently? Why???

We used to not send the WorkstationName during NTLMSSP until recent
patch from Shyam:

commit 49bd49f983b5026e4557d31c5d737d9657c4113e
Author: Shyam Prasad N <sprasad@xxxxxxxxxxxxx>
Date: Fri Nov 5 19:03:57 2021 +0000

cifs: send workstation name during ntlmssp session setup

During the ntlmssp session setup (authenticate phases)
send the client workstation info. This can make debugging easier on
servers.

Signed-off-by: Shyam Prasad N <sprasad@xxxxxxxxxxxxx>
Reviewed-by: Paulo Alcantara (SUSE) <pc@xxxxxx>
Reviewed-by: Enzo Matsumiya <ematsumiya@xxxxxxx>
Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx>

Unfortunately some servers did not seem to enforce it to be 16 bytes
long, so the reason why we didn't catch it earlier.

Steve, Shyam, let me know if it does make sense to you and then I can
work on a patch to fix it properly.