From 0ecce2433fbb72b56b9e63e18252abb28cc204cd Mon Sep 17 00:00:00 2001 From: Curtis Malainey Date: Mon, 19 Aug 2024 18:25:27 -0700 Subject: [PATCH] ipc3: fix subsize check The ext size is counted as part of the ipc header size. The process size and header size need to be less than the ipc max size. Signed-off-by: Curtis Malainey --- src/ipc/ipc3/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipc/ipc3/helper.c b/src/ipc/ipc3/helper.c index f64f17de7f13..13c1824e627d 100644 --- a/src/ipc/ipc3/helper.c +++ b/src/ipc/ipc3/helper.c @@ -293,7 +293,7 @@ static int comp_specific_builder(struct sof_ipc_comp *comp, if (IPC_TAIL_IS_SIZE_INVALID(*proc)) return -EBADMSG; - if (proc->comp.hdr.size + proc->comp.ext_data_length > SOF_IPC_MSG_MAX_SIZE) + if (proc->comp.hdr.size + proc->size > SOF_IPC_MSG_MAX_SIZE) return -EBADMSG; config->process.type = proc->type;