summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-09-25 23:25:12 +0200
committerKarolin Seeger <kseeger@samba.org>2013-12-05 11:11:51 +0100
commit17667fcf49609a67ce72b6be6f922003db9befdc (patch)
treedb4269161149efa05ca3ba807fd1d84166505b2f
parent288337429fe8f3a830e592a53b8b12e1a060d299 (diff)
downloadsamba-17667fcf49609a67ce72b6be6f922003db9befdc.tar.gz
CVE-2013-4408:s4:dcerpc: check for invalid frag_len in ncacn_pull()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--source4/librpc/rpc/dcerpc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c
index cc728668667..742d710a822 100644
--- a/source4/librpc/rpc/dcerpc.c
+++ b/source4/librpc/rpc/dcerpc.c
@@ -658,6 +658,10 @@ static NTSTATUS ncacn_pull(struct dcecli_connection *c, DATA_BLOB *blob, TALLOC_
return ndr_map_error2ntstatus(ndr_err);
}
+ if (pkt->frag_length != blob->length) {
+ return NT_STATUS_RPC_PROTOCOL_ERROR;
+ }
+
return NT_STATUS_OK;
}