Repository navigation
Conversation
ipc4_set_vendor_config_module_instance() reads tlv->length to reject zero-length TLVs before checking that a whole struct sof_tlv is left in the payload. With data_off_size = MAILBOX_HOSTBOX_SIZE and TLVs chained so the last header starts 4 bytes before the end, the length read lands just past the hostbox. Found by the IPC4 fuzzer (ASan): global-buffer-overflow READ of size 4 right after posix_hostbox. Move the header size check ahead of the first header field access. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
tmleman
requested review from
dbaluta,
kv2019i,
lbetlej,
lgirdwood,
mmaka1 and
plbossart
as code owners
December 3, 2026 13:46
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No actionable issues were found in the reviewed changes to IPC4 vendor-configuration parsing.
No open issues 🎉
What changed in this PR
Fixes an out-of-bounds read in IPC4 vendor-configuration parsing reported by the fuzzer.
Changes:
- Validates that each TLV header fits before reading its fields.
- Preserves separate value-length validation and clarifies bounds-check comments.
| File | Description |
|---|---|
src/ipc/ipc4/handler-user.c |
Moves the header-size check ahead of the first TLV field access. |
Review effort: Balanced
lgirdwood
approved these changes
Dec 3, 2026
PR 11607: test resultsRun date: 2026-12-03 17:20 UTC Tested commit: 056e4a31834cb9e13f099f17131fe4451b714972 |
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.
ipc4_set_vendor_config_module_instance() reads tlv->length to reject zero-length TLVs before checking that a whole struct sof_tlv is left in the payload. With data_off_size = MAILBOX_HOSTBOX_SIZE and TLVs chained so the last header starts 4 bytes before the end, the length read lands just past the hostbox.
Found by the IPC4 fuzzer (ASan): global-buffer-overflow READ of size 4 right after posix_hostbox.
Move the header size check ahead of the first header field access.