Skip to content

ASoC: SOF: ipc4-control: Validate notification payload size#5804

Open
ujfalusi wants to merge 1 commit into
thesofproject:topic/sof-devfrom
ujfalusi:peter/sof/pr/ipc4-control_notif_validate_size
Open

ASoC: SOF: ipc4-control: Validate notification payload size#5804
ujfalusi wants to merge 1 commit into
thesofproject:topic/sof-devfrom
ujfalusi:peter/sof/pr/ipc4-control_notif_validate_size

Conversation

@ujfalusi

@ujfalusi ujfalusi commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Validate MODULE_NOTIFICATION payload length before reading bytes/channel data in control update handling.

Fixes: 2a28b52 ("ASoC: SOF: ipc4-control: Add support for generic bytes control")

Validate MODULE_NOTIFICATION payload length before reading
bytes/channel data in control update handling.

Fixes: 2a28b52 ("ASoC: SOF: ipc4-control: Add support for generic bytes control")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Copilot AI review requested due to automatic review settings June 8, 2026 14:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens SOF IPC4 kcontrol notification handling by validating MODULE_NOTIFICATION payload lengths before reading variable-sized bytes or channel/value data, preventing out-of-bounds reads when firmware sends malformed/truncated notifications.

Changes:

  • Add payload length checks for bytes-control notifications (msg_data->data).
  • Add payload length checks for channel/value notifications (msg_data->chanv[]).
  • Ensure invalid notifications mark the cached control data as dirty and still trigger a user-space control notification.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

4 participants