diff options
author | Jeremy Allison <jra@samba.org> | 2021-01-06 09:03:05 -0800 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2021-01-15 07:26:29 +0000 |
commit | 0abb5ca6b96c843909dea56d5594e334547ae90f (patch) | |
tree | 1fc70f1be3dfb65bbe8199ad0c23f2cab2fe23c2 /libcli/smb/smbXcli_base.c | |
parent | fdcdfceefdd3186ef0b70bb6e83dddc8f4c073db (diff) | |
download | samba-0abb5ca6b96c843909dea56d5594e334547ae90f.tar.gz |
libcli/smb: Allow smb2cli_validate_negotiate_info_done() to ignore NT_STATUS_INVALID_PARAMETER.
This can be returned from NetApp Ontap 7.3.7 SMB server
implementations. Now we have ensured smb2_signing_check_pdu()
cannot return NT_STATUS_INVALID_PARAMETER on a signing error
it's safe to check this error code here. Windows 10
clients ignore this error from the NetApp.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14607
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'libcli/smb/smbXcli_base.c')
-rw-r--r-- | libcli/smb/smbXcli_base.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index 0fc4aa4451a..e4d495f9622 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -5428,6 +5428,18 @@ static void smb2cli_validate_negotiate_info_done(struct tevent_req *subreq) &state->out_input_buffer, &state->out_output_buffer); TALLOC_FREE(subreq); + + /* + * This response must be signed correctly for + * these "normal" error codes to be processed. + * If the packet wasn't signed correctly we will get + * NT_STATUS_ACCESS_DENIED or NT_STATUS_HMAC_NOT_SUPPORTED, + * or NT_STATUS_INVALID_NETWORK_RESPONSE + * from smb2_signing_check_pdu(). + * + * We must never ignore the above errors here. + */ + if (NT_STATUS_EQUAL(status, NT_STATUS_FILE_CLOSED)) { /* * The response was signed, but not supported @@ -5473,6 +5485,19 @@ static void smb2cli_validate_negotiate_info_done(struct tevent_req *subreq) tevent_req_done(req); return; } + if (NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER)) { + /* + * The response was signed, but not supported + * + * This might be returned by NetApp Ontap 7.3.7 SMB server + * implementations. + * + * BUG: https://bugzilla.samba.org/show_bug.cgi?id=14607 + * + */ + tevent_req_done(req); + return; + } if (tevent_req_nterror(req, status)) { return; } |