diff options
author | Stefan Metzmacher <metze@samba.org> | 2013-09-25 23:25:12 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2013-12-09 07:05:45 +0100 |
commit | db5fff3bc91535a9dab8c622e5e98c098956bb65 (patch) | |
tree | 9791a94a453c837f04f22fb56ae50c3a932c9636 | |
parent | 8b7c862babeb2bccfe5041495706f2aac6f73f6f (diff) | |
download | samba-db5fff3bc91535a9dab8c622e5e98c098956bb65.tar.gz samba-db5fff3bc91535a9dab8c622e5e98c098956bb65.tar.xz samba-db5fff3bc91535a9dab8c622e5e98c098956bb65.zip |
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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/librpc/rpc/dcerpc.c b/source4/librpc/rpc/dcerpc.c index fd724063c2a..56b821ecce0 100644 --- a/source4/librpc/rpc/dcerpc.c +++ b/source4/librpc/rpc/dcerpc.c @@ -717,6 +717,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; } |