gss-ntlmssp icon indicating copy to clipboard operation
gss-ntlmssp copied to clipboard

Problem working versus CIFS from kernel 5.17

Open rshterman opened this issue 1 year ago • 10 comments

Hi,

In Linux kernel 5.17 the client started to use Version in the Negotiate message - `commit 52d005337b2c94ab37273d9ad8382d4fb051defd Author: Steve French [email protected] Date: Wed Jan 19 22:00:29 2022 -0600

smb3: send NTLMSSP version information

For improved debugging it can be helpful to send version information
as other clients do during NTLMSSP negotiation. See protocol document
MS-NLMP section 2.2.1.1

Set the major and minor versions based on the kernel version, and the
BuildNumber based on the internal cifs.ko module version number,
and following the recommendation in the protocol documentation
(MS-NLMP section 2.2.10) we set the NTLMRevisionCurrent field to 15.

Reviewed-by: Shyam Prasad N <[email protected]>
Signed-off-by: Steve French <[email protected]>

`

This commit is causing the VERSION flag to be set also in the AUTH message but the client is not sending Version in the auth message so we are doing wrong parsing and failing the login because the first header is written in offset 64 while we are expecting it in offset 72 (because we add the version size). Checking the kernel code I see the logic decides about the offset in the payload only based on the offset mentioned in the first header and not basing it on the struct size, thoughts about changing it to have the same logic?

rshterman avatar Jul 17 '23 07:07 rshterman