summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2016-06-20 16:17:45 +0200
committerKarolin Seeger <kseeger@samba.org>2016-08-04 10:59:19 +0200
commit93e8b4e0f9d59a04551df47b438f5ebd55f568a5 (patch)
treeed5a1c18aa375905bf5d3ab3a99a270f434430ca
parentd950d0f6b50b93ef8b96490c7f353336c161f12d (diff)
downloadsamba-93e8b4e0f9d59a04551df47b438f5ebd55f568a5.tar.gz
librpc/rpc: let dcerpc_pull_auth_trailer() only accept auth_length!=NULL or auth_data_only=true
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11982 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit f386e81b982cd551313eb9c0f7d2f70d65515d80)
-rw-r--r--librpc/rpc/dcerpc_util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/librpc/rpc/dcerpc_util.c b/librpc/rpc/dcerpc_util.c
index 43e1b7f426f..4d82e9a53a9 100644
--- a/librpc/rpc/dcerpc_util.c
+++ b/librpc/rpc/dcerpc_util.c
@@ -99,6 +99,14 @@ NTSTATUS dcerpc_pull_auth_trailer(const struct ncacn_packet *pkt,
ZERO_STRUCTP(auth);
if (_auth_length != NULL) {
*_auth_length = 0;
+
+ if (auth_data_only) {
+ return NT_STATUS_INTERNAL_ERROR;
+ }
+ } else {
+ if (!auth_data_only) {
+ return NT_STATUS_INTERNAL_ERROR;
+ }
}
/* Paranoia checks for auth_length. The caller should check this... */