audio: mux: fix a blob size check - #11113
Open
lyakh wants to merge 1 commit into
Open
Conversation
Before dereferencing the data blob make sure that it matches the expected size, not just isn't exceeding the maximum size. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the IPC4 mux module configuration parsing by validating that the received data blob is exactly the expected struct size before it is dereferenced, preventing out-of-bounds reads on undersized blobs (as found by fuzzing).
Changes:
- Tighten mux IPC4 blob validation from “not exceeding max” to “exactly equals expected struct size”.
- Fail early with
-EINVALwhen the config blob is missing or undersized.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
wjablon1
approved these changes
Aug 21, 2026
kv2019i
approved these changes
Aug 24, 2026
kv2019i
left a comment
Collaborator
There was a problem hiding this comment.
I'm guessing CI would pick up if there are any cases with test cases depending on this relaxed check....
Collaborator
Author
|
@lrudyX I see two QB failures above: (1) random HDA DMA, (2) DMIC on LNL. Not sure about the latter - this PR only touches mux and I don't think that DMIC test uses it? Am I right? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before dereferencing the data blob make sure that it matches the expected size, not just isn't exceeding the maximum size.
found by fuzzer https://github.com/thesofproject/sof/actions/runs/32463369471/job/96714735796?pr=11108