1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-01 04:58:35 +03:00

CVE-2015-5370: s4:librpc/rpc: make use of dcerpc_map_ack_reason() in dcerpc_bind_recv_handler()

This should give better error messages if the server doesn't support
a specific abstract/transfer syntax.

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>
This commit is contained in:
Stefan Metzmacher 2015-06-27 10:31:48 +02:00
parent 9b9d3077ea
commit 1551c418a4

View File

@ -1345,13 +1345,21 @@ static void dcerpc_bind_recv_handler(struct rpc_request *subreq,
}
if ((pkt->ptype != DCERPC_PKT_BIND_ACK) ||
(pkt->u.bind_ack.num_results == 0) ||
(pkt->u.bind_ack.ctx_list[0].result != 0)) {
(pkt->u.bind_ack.num_results == 0)) {
state->p->last_fault_code = DCERPC_NCA_S_PROTO_ERROR;
tevent_req_nterror(req, NT_STATUS_NET_WRITE_FAULT);
return;
}
if (pkt->u.bind_ack.ctx_list[0].result != 0) {
status = dcerpc_map_ack_reason(&pkt->u.bind_ack.ctx_list[0]);
DEBUG(2,("dcerpc: bind_ack failed - reason %d - %s\n",
pkt->u.bind_ack.ctx_list[0].reason.value,
nt_errstr(status)));
tevent_req_nterror(req, status);
return;
}
/*
* DCE-RPC 1.1 (c706) specifies
* CONST_MUST_RCV_FRAG_SIZE as 1432