Repository navigation
Cloud-detected fuzz fixups - #7756
Merged
Merged
Conversation
andyross
requested review from
aborisovich,
bardliao,
dbaluta,
fkwasowi,
iganakov,
lbetlej,
lgirdwood,
marcinszkudlinski,
mmaka1,
pblaszko and
plbossart
as code owners
June 6, 2023 15:31
The config block for the component gets provided externally and is copied directly in using a byte count likewise provided by the host. The use of memcpy_s() prevents overruns, but the error that was detected was being reported via assert(). To fuzzing, that assertion is a fatal error, when clearly this needs to be a runtime failure as it's due to external input and not a local code bug. Signed-off-by: Andy Ross <andyross@google.com>
This function is called based on external commands, and with an arbitrary component ID that may not actually be a pipeline. Check the type before following garbage pointers and passing them down into call trees. Found via fuzzing. Signed-off-by: Andy Ross <andyross@google.com>
These list heads in the comp_dev struct are not uniformly initialized (grepping the source, the list_init() calls for these fields seem to be spread around the source tree in individual components). Fuzzing is seeing nulls here, presumably because it's possible to reach ipc_comp_free() in "unintended lifecycle" circumstances where they weren't initialized. Check the fields before crashing. Signed-off-by: Andy Ross <andyross@google.com>
This handler was missing its type check and would follow comp_dev union fields on components that might be buffers or pipelines, leading to crashes downstream. Found via fuzzing. Signed-off-by: Andy Ross <andyross@google.com>
cujomalainey
approved these changes
Jun 6, 2023
kv2019i
approved these changes
Jun 6, 2023
Contributor
|
@mwasko fixes for cavs25-drop-stable as well as other stable branches |
Collaborator
|
The accidental and unrelated rimage change was caught by Github check https://github.com/thesofproject/sof/actions/runs/5190604343/jobs/9357300136 Please don't merge PRs with unexplained red crosses. |
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.
A collection of minor fixes discovered by oss-fuzz over the last week. There's some guesswork involved here, as most of the crashes are lower down as other code follows e.g. bad pointers. I think the conditions here cover most (maybe all) of the failures I'm seeing reported. We'll see how that evolves, no doubt there will be more to come.