mirror of
https://github.com/samba-team/samba.git
synced 2025-03-12 20:58:37 +03:00
auth/ntlmssp: make sure we return INVALID_PARAMETER for NTLMv2_RESPONSE parsing errors
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14932 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jan 4 20:57:41 UTC 2022 on sn-devel-184 (cherry picked from commit dd9886100514941aa16af8566faf41501b601a44) Autobuild-User(v4-15-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-15-test): Tue Jan 18 20:22:14 UTC 2022 on sn-devel-184
This commit is contained in:
parent
af3c6b570f
commit
2a59fd316f
@ -532,6 +532,14 @@ static NTSTATUS ntlmssp_server_preauth(struct gensec_security *gensec_security,
|
||||
(ndr_pull_flags_fn_t)ndr_pull_NTLMv2_RESPONSE);
|
||||
if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
|
||||
nt_status = ndr_map_error2ntstatus(err);
|
||||
if (NT_STATUS_EQUAL(nt_status, NT_STATUS_BUFFER_TOO_SMALL)) {
|
||||
/*
|
||||
* Note that invalid blobs should result in
|
||||
* INVALID_PARAMETER, as demonstrated by
|
||||
* smb2.session.ntlmssp_bug14932
|
||||
*/
|
||||
nt_status = NT_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
DEBUG(1,("%s: failed to parse NTLMv2_RESPONSE of length %zu for "
|
||||
"user=[%s] domain=[%s] workstation=[%s] - %s %s\n",
|
||||
__func__, ntlmssp_state->nt_resp.length,
|
||||
|
@ -1,5 +0,0 @@
|
||||
^samba3.smb2.session.plain.ntlmssp_bug14932\(nt4_dc\)
|
||||
^samba3.smb2.session.enc.ntlmssp_bug14932\(nt4_dc\)
|
||||
^samba3.smb2.session.ntlm.ntlmssp_bug14932\(ad_dc\)
|
||||
^samba3.smb2.session.krb5.ntlmssp_bug14932\(ad_dc\)
|
||||
^samba3.smb2.session.krb5.ntlmssp_bug14932\(ad_member_idmap_rid\)
|
Loading…
x
Reference in New Issue
Block a user