CVE-2015-5370: s3:librpc/rpc: verify auth_context_id in dcerpc_check_auth()
authorStefan Metzmacher <metze@samba.org>
Tue, 7 Jul 2015 22:01:37 +0000 (00:01 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 30 Mar 2016 02:10:16 +0000 (04:10 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11344

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
source3/librpc/rpc/dcerpc_helpers.c

index c030f7910d75128920747c50bbac4ceb14e38b81..aab43a1abd4c5505f5eb8c9155ac9e392c761e95 100644 (file)
@@ -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);