diff options
author | Meetakshi Setiya <msetiya@microsoft.com> | 2023-10-04 07:17:55 -0400 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-10-22 19:03:42 -0500 |
commit | 1460720c5913c11415e4d7c4df5a287eb2ad3f3e (patch) | |
tree | 93cecacfabb97c9540680ca26831f9a508e51657 /fs/smb/client/sess.c | |
parent | 475efd9808a3094944a56240b2711349e433fb66 (diff) |
cifs: Add client version details to NTLM authenticate message
The NTLM authenticate message currently sets the NTLMSSP_NEGOTIATE_VERSION
flag but does not populate the VERSION structure. This commit fixes this
bug by ensuring that the flag is set and the version details are included
in the message.
Signed-off-by: Meetakshi Setiya <msetiya@microsoft.com>
Reviewed-by: Bharath SM <bharathsm@microsoft.com>
Reviewed-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/sess.c')
-rw-r--r-- | fs/smb/client/sess.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/smb/client/sess.c b/fs/smb/client/sess.c index 79f26c560edf..919ace2d13d4 100644 --- a/fs/smb/client/sess.c +++ b/fs/smb/client/sess.c @@ -1060,10 +1060,16 @@ int build_ntlmssp_auth_blob(unsigned char **pbuffer, memcpy(sec_blob->Signature, NTLMSSP_SIGNATURE, 8); sec_blob->MessageType = NtLmAuthenticate; + /* send version information in ntlmssp authenticate also */ flags = ses->ntlmssp->server_flags | NTLMSSP_REQUEST_TARGET | - NTLMSSP_NEGOTIATE_TARGET_INFO | NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED; - /* we only send version information in ntlmssp negotiate, so do not set this flag */ - flags = flags & ~NTLMSSP_NEGOTIATE_VERSION; + NTLMSSP_NEGOTIATE_TARGET_INFO | NTLMSSP_NEGOTIATE_VERSION | + NTLMSSP_NEGOTIATE_WORKSTATION_SUPPLIED; + + sec_blob->Version.ProductMajorVersion = LINUX_VERSION_MAJOR; + sec_blob->Version.ProductMinorVersion = LINUX_VERSION_PATCHLEVEL; + sec_blob->Version.ProductBuild = cpu_to_le16(SMB3_PRODUCT_BUILD); + sec_blob->Version.NTLMRevisionCurrent = NTLMSSP_REVISION_W2K3; + tmp = *pbuffer + sizeof(AUTHENTICATE_MESSAGE); sec_blob->NegotiateFlags = cpu_to_le32(flags); |