]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fs/cifs: correctly to anonymous authentication via NTLMSSP
authorStefan Metzmacher <metze@samba.org>
Tue, 3 May 2016 08:52:30 +0000 (10:52 +0200)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 22:21:57 +0000 (17:21 -0500)
commitd67656b8498da654d879319a93f3138d98d79dd5
tree191979b1dd19f46ea5628f76aa612979416ebb71
parent99b1e39721b81616634bbc9ef61b3b6182321a0a
fs/cifs: correctly to anonymous authentication via NTLMSSP

Orabug: 25308022

[ Upstream commit cfda35d98298131bf38fbad3ce4cd5ecb3cf18db ]

See [MS-NLMP] 3.2.5.1.2 Server Receives an AUTHENTICATE_MESSAGE from the Client:

   ...
   Set NullSession to FALSE
   If (AUTHENTICATE_MESSAGE.UserNameLen == 0 AND
      AUTHENTICATE_MESSAGE.NtChallengeResponse.Length == 0 AND
      (AUTHENTICATE_MESSAGE.LmChallengeResponse == Z(1)
       OR
       AUTHENTICATE_MESSAGE.LmChallengeResponse.Length == 0))
       -- Special case: client requested anonymous authentication
       Set NullSession to TRUE
   ...

Only server which map unknown users to guest will allow
access using a non-null NTChallengeResponse.

For Samba it's the "map to guest = bad user" option.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11913

CC: Stable <stable@vger.kernel.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit f39b179308d938c7bb6da74fd0699c0eb4356ef8)
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
fs/cifs/sess.c