summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-05-09 09:41:08 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-05-09 09:41:08 +0000
commitb4ecdb2e582376d2713f81e8e32a668014905d70 (patch)
tree4eb030edbd808880ffb515a39acb99bbecedbdae /source
parenta4556786d28724309321a02afbf5005158440258 (diff)
downloadsamba-b4ecdb2e582376d2713f81e8e32a668014905d70.tar.gz
samba-b4ecdb2e582376d2713f81e8e32a668014905d70.tar.xz
samba-b4ecdb2e582376d2713f81e8e32a668014905d70.zip
Make sure we always have some client data, not just the hash. An NTLMv2 or
LMv2 response less than 24 bytes is just silly. Andrew Bartlett
Diffstat (limited to 'source')
-rw-r--r--source/auth/auth_sam.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/auth/auth_sam.c b/source/auth/auth_sam.c
index 9a619f81f67..cb88014e98e 100644
--- a/source/auth/auth_sam.c
+++ b/source/auth/auth_sam.c
@@ -98,9 +98,10 @@ static BOOL smb_pwd_check_ntlmv2(const DATA_BLOB ntv2_response,
return False;
}
- if (ntv2_response.length < 16) {
+ if (ntv2_response.length < 24) {
/* We MUST have more than 16 bytes, or the stuff below will go
- crazy... */
+ crazy. No known implementation sends less than the 24 bytes
+ for LMv2, let alone NTLMv2. */
DEBUG(0, ("smb_pwd_check_ntlmv2: incorrect password length (%d)\n",
ntv2_response.length));
return False;