diff --git a/librpc/rpc/dcerpc_util.c b/librpc/rpc/dcerpc_util.c index b571e1b8549..51a8a11ac4a 100644 --- a/librpc/rpc/dcerpc_util.c +++ b/librpc/rpc/dcerpc_util.c @@ -362,10 +362,9 @@ NTSTATUS dcerpc_pull_auth_trailer(const struct ncacn_packet *pkt, * * See also bug #11982. */ - if (auth_data_only && data_and_pad == 0 && - auth->auth_pad_length > 0) { + if (auth_data_only) { /* - * we need to ignore invalid auth_pad_length + * We need to ignore auth_pad_length * values for BIND_*, ALTER_* and AUTH3 pdus. */ auth->auth_pad_length = 0; @@ -385,34 +384,6 @@ NTSTATUS dcerpc_pull_auth_trailer(const struct ncacn_packet *pkt, return NT_STATUS_RPC_PROTOCOL_ERROR; } - if (auth_data_only && data_and_pad > auth->auth_pad_length) { - DBG_WARNING(__location__ ": ERROR: auth_data_only pad length mismatch. " - "Client sent a longer BIND packet than expected by %"PRIu16" bytes " - "(pkt_trailer->length=%zu - auth_length=%"PRIu16") " - "= %"PRIu16" auth_pad_length=%"PRIu8"\n", - data_and_pad - auth->auth_pad_length, - pkt_trailer->length, - auth_length, - data_and_pad, - auth->auth_pad_length); - talloc_free(ndr); - ZERO_STRUCTP(auth); - return NT_STATUS_RPC_PROTOCOL_ERROR; - } - - if (auth_data_only && data_and_pad != auth->auth_pad_length) { - DBG_WARNING(__location__ ": ERROR: auth_data_only pad length mismatch. " - "Calculated %"PRIu16" (pkt_trailer->length=%zu - auth_length=%"PRIu16") " - "but auth_pad_length=%"PRIu8"\n", - data_and_pad, - pkt_trailer->length, - auth_length, - auth->auth_pad_length); - talloc_free(ndr); - ZERO_STRUCTP(auth); - return NT_STATUS_RPC_PROTOCOL_ERROR; - } - DBG_DEBUG("auth_pad_length %"PRIu8"\n", auth->auth_pad_length); diff --git a/selftest/knownfail.d/dcerpc-auth-pad b/selftest/knownfail.d/dcerpc-auth-pad index ae54bd75cc9..29a7fcc48fd 100644 --- a/selftest/knownfail.d/dcerpc-auth-pad +++ b/selftest/knownfail.d/dcerpc-auth-pad @@ -1,11 +1,5 @@ -^samba.tests.dcerpc.raw_protocol.samba.tests.dcerpc.raw_protocol.TestDCERPC_BIND.test_auth_full_pad_ntlm_alter -^samba.tests.dcerpc.raw_protocol.samba.tests.dcerpc.raw_protocol.TestDCERPC_BIND.test_auth_full_pad_ntlm_auth3 ^samba.tests.dcerpc.raw_protocol.samba.tests.dcerpc.raw_protocol.TestDCERPC_BIND.test_auth_full_pad_spnego_alter ^samba.tests.dcerpc.raw_protocol.samba.tests.dcerpc.raw_protocol.TestDCERPC_BIND.test_auth_full_pad_spnego_auth3 -^samba.tests.dcerpc.raw_protocol.samba.tests.dcerpc.raw_protocol.TestDCERPC_BIND.test_auth_mid_pad_ntlm_alter -^samba.tests.dcerpc.raw_protocol.samba.tests.dcerpc.raw_protocol.TestDCERPC_BIND.test_auth_mid_pad_ntlm_auth3 -^samba.tests.dcerpc.raw_protocol.samba.tests.dcerpc.raw_protocol.TestDCERPC_BIND.test_auth_mid_pad_spnego_alter -^samba.tests.dcerpc.raw_protocol.samba.tests.dcerpc.raw_protocol.TestDCERPC_BIND.test_auth_mid_pad_spnego_auth3 ^samba.tests.dcerpc.raw_protocol.samba.tests.dcerpc.raw_protocol.TestDCERPC_BIND.test_auth_pad_auth3_align2_ntlm ^samba.tests.dcerpc.raw_protocol.samba.tests.dcerpc.raw_protocol.TestDCERPC_BIND.test_auth_pad_auth3_align2_spnego ^samba.tests.dcerpc.raw_protocol.samba.tests.dcerpc.raw_protocol.TestDCERPC_BIND.test_auth_pad_ntlm_2889_alter