ibacm: Check for source space in resolve requests
PATCH 1/1 ibacm: Check for source space in resolve requests
If a resolve request omits the source address, acm_svr_verify_resolve() uses the next endpoint slot as a scratch source address. A full request can already contain all eight endpoint slots. In that case there is no scratch slot, and the current code writes past the fixed message buffer.
Reject a source-less request when there is no endpoint slot left for the selected source address.
Fixes 5cf79fbad67a ("ibacm: resolve source address if not given")
Assisted-by Claude:claude-opus-4-7
Signed-off-by Michael Bommarito <[email protected]>
--- ibacm/src/acm.c | 4 ++++ 1 file changed, 4 insertions(+)
ibacm/src/acm.c +4 -0
@@ -1044,6 +1044,10 @@ static uint8_t acm_svr_verify_resolve(struct acm_msg *msg) }if (msg->hdr.src_out) { +if (i >=ACM_MSG_DATA_LENGTH /ACM_MSG_EP_LENGTH ) { +acm_log (0 ,"ERROR - no room for source address\n" ); +return ACM_STATUS_EINVAL ; + } msg->hdr.src_index = i;memset (&msg->resolve_data[i],0 ,sizeof (struct acm_ep_addr_data )); }
Signature · 1 line
2.53.0