Repository navigation
Conversation
comp_free_data_blob() returned early when blob_handler->data was NULL, without releasing blob_handler->data_new. data_new holds a blob that is still being received, so a host that sends the FIRST fragment of a multi-fragment LARGE_CONFIG_SET to a module without a configuration and then deletes the module, or re-initializes the blob, leaks the whole data_new allocation (up to the host-chosen data_offset_size). Free data and data_new independently and reset the remaining transfer state, so the handler is left fully empty. Found with the IPC4 fuzzer: every testcase doing EQ FIR init followed by a FIRST-only large config set leaked one allocation, and with CONFIG_SYS_HEAP_HARDENING_EXTREME the accumulated chunks made every later alloc/free progressively slower. 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 1, 2026 17:01
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the audio blob cleanup change.
No open issues 🎉
What changed in this PR
Fixes a memory leak in audio blob cleanup when a partially received configuration exists but no blob has been committed, covering module deletion and blob reinitialization.
Changes:
- Removes the early return so committed and pending blobs are freed independently.
- Resets the pending blob size, transfer position, and readiness flag during cleanup.
| File | Description |
|---|---|
src/audio/data_blob.c |
Releases pending blobs even without committed data and clears remaining transfer state. |
Review effort: Balanced
PR 11579: test resultsRun date: 2026-12-01 18:13 UTC Tested commit: 039d5c54098ecb4b3f0b8e16b6e26d21e3e45d83 |
lgirdwood
approved these changes
Dec 1, 2026
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.
comp_free_data_blob() returned early when blob_handler->data was NULL, without releasing blob_handler->data_new. data_new holds a blob that is still being received, so a host that sends the FIRST fragment of a multi-fragment LARGE_CONFIG_SET to a module without a configuration and then deletes the module, or re-initializes the blob, leaks the whole data_new allocation (up to the host-chosen data_offset_size).
Free data and data_new independently and reset the remaining transfer state, so the handler is left fully empty.
Found with the IPC4 fuzzer: every testcase doing EQ FIR init followed by a FIRST-only large config set leaked one allocation, and with CONFIG_SYS_HEAP_HARDENING_EXTREME the accumulated chunks made every later alloc/free progressively slower.