From: Stefan Metzmacher Date: Tue, 7 Jul 2015 22:01:37 +0000 (+0200) Subject: CVE-2015-5370: s3:librpc/rpc: verify auth_context_id in dcerpc_check_auth() X-Git-Tag: samba-4.2.10~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cf3151c843e2c779b534743b455e630d89e2ba9;p=thirdparty%2Fsamba.git CVE-2015-5370: s3:librpc/rpc: verify auth_context_id in dcerpc_check_auth() BUG: https://bugzilla.samba.org/show_bug.cgi?id=11344 Signed-off-by: Stefan Metzmacher Reviewed-by: Günther Deschner --- diff --git a/source3/librpc/rpc/dcerpc_helpers.c b/source3/librpc/rpc/dcerpc_helpers.c index c030f7910d7..aab43a1abd4 100644 --- a/source3/librpc/rpc/dcerpc_helpers.c +++ b/source3/librpc/rpc/dcerpc_helpers.c @@ -515,6 +515,10 @@ NTSTATUS dcerpc_check_auth(struct pipe_auth_data *auth, return NT_STATUS_INVALID_PARAMETER; } + if (auth_info.auth_context_id != auth->auth_context_id) { + return NT_STATUS_INVALID_PARAMETER; + } + pkt_trailer->length -= auth_length; data = data_blob_const(raw_pkt->data + header_size, pkt_trailer->length);