Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions src/ipc/ipc4/handler-user.c
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,6 @@ __cold static int ipc4_process_chain_dma(struct ipc4_message_request *ipc4)
if (ret < 0)
return IPC4_INVALID_CHAIN_STATE_TRANSITION;

if (!cdma.primary.r.allocate && !cdma.primary.r.enable)
list_item_del(&cdma_comp->list);

return IPC4_SUCCESS;
#else
return IPC4_UNAVAILABLE;
Expand Down Expand Up @@ -1109,15 +1106,15 @@ __cold static int ipc4_set_vendor_config_module_instance(struct comp_dev *dev,

assert_can_be_cold();

/* Validate host-controlled payload size before any use or arithmetic. */
if (data_off_size > MAILBOX_HOSTBOX_SIZE)
return IPC4_INVALID_CONFIG_DATA_STRUCT;
if (init_block && data_off_size < sizeof(struct sof_tlv))
return IPC4_INVALID_CONFIG_DATA_STRUCT;
Comment on lines +1113 to +1116

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be fixed later or in update, but we need unique error LOG messages for each failure.


/* Old FW comment: bursted configs */
if (init_block && final_block) {
const struct sof_tlv *tlv = (struct sof_tlv *)data;
/* if there is no payload in this large config set
* (4 bytes type | 4 bytes length=0 | no value)
* we do not handle such case
*/
if (data_off_size < sizeof(struct sof_tlv) || data_off_size > MAILBOX_HOSTBOX_SIZE)
return IPC4_INVALID_CONFIG_DATA_STRUCT;

/* ===Iterate over payload===
* Payload can have multiple sof_tlv structures inside,
Expand Down
Loading