Skip to content

module_adapter: validate channels and cadence tlv#10902

Open
abonislawski wants to merge 2 commits into
thesofproject:mainfrom
abonislawski:fix/module_adapter-cadence
Open

module_adapter: validate channels and cadence tlv#10902
abonislawski wants to merge 2 commits into
thesofproject:mainfrom
abonislawski:fix/module_adapter-cadence

Conversation

@abonislawski

Copy link
Copy Markdown
Member

No description provided.

Reject 0 or > PLATFORM_MAX_CHANNELS before modules index channel-sized arrays.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Bound each host-supplied module_param against the bytes remaining
to avoid an OOB read or a stalled loop.

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Copilot AI review requested due to automatic review settings June 12, 2026 14:21

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

Note

Copilot was unable to run its full agentic suite in this review.

Adds defensive validation for host-supplied configuration blobs to prevent out-of-bounds access during module configuration.

Changes:

  • Validate channels_count against PLATFORM_MAX_CHANNELS in IPC4 module adapter init.
  • Validate TLV/parameter blob sizes before using cadence codec parameters.

Reviewed changes

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

File Description
src/audio/module_adapter/module_adapter_ipc4.c Adds bounds-check for host-provided channel count to keep array indexing safe.
src/audio/module_adapter/module/cadence.c Adds param size validation for host-supplied TLV blob to avoid malformed-buffer handling issues.

Comment thread src/audio/module_adapter/module/cadence.c
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.

2 participants