Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Tom Talpey <tom@talpey.com>
To: Paulo Alcantara <pc@cjr.nz>, Steven French <sfrench@samba.org>,
	Byron Stanoszek <gandalf@winds.org>
Cc: linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: CIFS regression mounting vers=1.0 NTLMSSP when hostname is too long
Date: Wed, 4 May 2022 16:18:22 -0400	[thread overview]
Message-ID: <df763cb0-83f2-35a5-a381-57cfd040becf@talpey.com> (raw)
In-Reply-To: <87tua51550.fsf@cjr.nz>


On 5/4/2022 3:15 PM, Paulo Alcantara wrote:
> Hi Steve,
> 
> Steven French <sfrench@samba.org> writes:
> 
>> makes sense - do you see anything related in the NTLMSSP doc?
> 
> I'll quote some relevant parts from MS-NLMP which make sense to me:
> 
> 	3.1.5.1.2 Client Receives a CHALLENGE_MESSAGE from the Server
> 	...
> 	If the NTLMSSP_NEGOTIATE_VERSION flag is set by the client application,
> 	the Version field MUST be set to the current version (section 2.2.2.10),
> 	and the Workstation field MUST be set to NbMachineName.
> 	
> 	3.2.1.1 Variables Internal to the Protocol
> 	...
> 	NbMachineName: A string that indicates the NetBIOS machine name of the
> 	server.
> 	
> 	2.2.2.1 AV_PAIR
> 	...
> 	MsvAvNbComputerName: The server's NetBIOS computer name. The name MUST
> 	be in Unicode, and is not null-terminated. This type of information MUST
> 	be present in the AV_pair list.
> 
> and indeed we set NTLMSSP_NEGOTIATE_VERSION in
> fs/cifs/sess.c:build_ntlmssp_smb3_negotiate_blob().
> 
> Unless I didn't miss anything obvious, I think we should be sending
> NetBIOS name or simply truncate utsname()->nodename to 16 bytes as
> previously proposed by Byron regardless what protocol version is being
> used.
> 
> Tom, what is your opinion on that?

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.

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.

Did this code change recently? Why???

Tom.

  reply	other threads:[~2022-05-04 20:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03 20:36 CIFS regression mounting vers=1.0 NTLMSSP when hostname is too long Byron Stanoszek
2022-05-04  1:35 ` Paulo Alcantara
2022-05-04  5:43   ` Steven French
2022-05-04 19:15     ` Paulo Alcantara
2022-05-04 20:18       ` Tom Talpey [this message]
2022-05-04 20:58         ` Paulo Alcantara
2022-05-06  2:03           ` Steve French
2022-05-06  2:19           ` ronnie sahlberg
2022-05-06 14:05             ` Paulo Alcantara
2022-05-04  7:13 ` Thorsten Leemhuis
2022-05-17 20:37 ` Paulo Alcantara
2022-05-22  4:40   ` Steven French
2022-05-23  2:32     ` Byron Stanoszek
2022-05-25  3:17   ` Byron Stanoszek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=df763cb0-83f2-35a5-a381-57cfd040becf@talpey.com \
    --to=tom@talpey.com \
    --cc=gandalf@winds.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pc@cjr.nz \
    --cc=sfrench@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox