diff options
author | Stefan Metzmacher <metze@samba.org> | 2016-06-20 16:17:45 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2016-08-04 10:59:19 +0200 |
commit | 93e8b4e0f9d59a04551df47b438f5ebd55f568a5 (patch) | |
tree | ed5a1c18aa375905bf5d3ab3a99a270f434430ca | |
parent | d950d0f6b50b93ef8b96490c7f353336c161f12d (diff) | |
download | samba-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.c | 8 |
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... */ |