Skip to content

mux: validation fixes#10885

Merged
kv2019i merged 3 commits into
thesofproject:mainfrom
abonislawski:fix/mux-ipc3-ipc4
Jun 17, 2026
Merged

mux: validation fixes#10885
kv2019i merged 3 commits into
thesofproject:mainfrom
abonislawski:fix/mux-ipc3-ipc4

Conversation

@abonislawski

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 11, 2026 15:35
@abonislawski abonislawski requested a review from fkwasowi as a code owner June 11, 2026 15:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens validation for the mux component configuration in both IPC4 and IPC3 paths to prevent out-of-bounds indexing and to fail fast on unsupported “mixing” configurations.

Changes:

  • IPC4: add validation for host-supplied channel counts and source queue IDs; propagate validation failures via return codes.
  • IPC3: make mux_mix_check() failure return -EINVAL instead of only logging an error.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
src/audio/mux/mux_ipc4.c Adds IPC4 config/param validation and error propagation for invalid channel counts and queue IDs.
src/audio/mux/mux_ipc3.c Ensures mux channel-mixing validation failures abort parameter setup with -EINVAL.

Comment thread src/audio/mux/mux_ipc4.c Outdated
Comment thread src/audio/mux/mux_ipc4.c Outdated
Comment thread src/audio/mux/mux_ipc4.c Outdated
@kv2019i kv2019i requested review from Copilot and lyakh June 12, 2026 08:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread src/audio/mux/mux_ipc4.c Outdated
@abonislawski

Copy link
Copy Markdown
Member Author

Added one more IPC4 check for copilot & validated all possible formats in IPC4 tests

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread src/audio/mux/mux_ipc4.c Outdated
build_config() looped over host-supplied channels_count
writing streams[].mask[] (size PLATFORM_MAX_CHANNELS),
overflowing it. Reject counts above the max.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Comment thread src/audio/mux/mux_ipc4.c
Comment thread src/audio/mux/mux_ipc4.c Outdated
@abonislawski

Copy link
Copy Markdown
Member Author

Cosmetic changes only

Comment thread src/audio/mux/mux_ipc4.c
set_mux_params() indexed streams[] with the host-supplied
bind queue ID without bounds, allowing an OOB write.
Validate against MUX_MAX_STREAMS and propagate the error.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
mux_set_values() logged a mux_mix_check() failure
but still returned success, applying an invalid
routing matrix. Return -EINVAL, matching the IPC4 path.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
@abonislawski

Copy link
Copy Markdown
Member Author

Just rerun, no changes

@kv2019i kv2019i merged commit ab50419 into thesofproject:main Jun 17, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants