Bug 2348222 (CVE-2022-49518) - CVE-2022-49518 kernel: ASoC: SOF: ipc3-topology: Correct get_control_data for non bytes payload
Summary: CVE-2022-49518 kernel: ASoC: SOF: ipc3-topology: Correct get_control_data for...
Keywords:
Status: NEW
Alias: CVE-2022-49518
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-02-26 03:21 UTC by OSIDB Bzimport
Modified: 2025-03-04 12:53 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-02-26 03:21:53 UTC
In the Linux kernel, the following vulnerability has been resolved:

ASoC: SOF: ipc3-topology: Correct get_control_data for non bytes payload

It is possible to craft a topology where sof_get_control_data() would do
out of bounds access because it expects that it is only called when the
payload is bytes type.
Confusingly it also handles other types of controls, but the payload
parsing implementation is only valid for bytes.

Fix the code to count the non bytes controls and instead of storing a
pointer to sof_abi_hdr in sof_widget_data (which is only valid for bytes),
store the pointer to the data itself and add a new member to save the size
of the data.

In case of non bytes controls we store the pointer to the chanv itself,
which is just an array of values at the end.

In case of bytes control, drop the wrong cdata->data (wdata[i].pdata) check
against NULL since it is incorrect and invalid in this context.
The data is pointing to the end of cdata struct, so it should never be
null.

Comment 3 Avinash Hanwate 2025-02-27 15:52:07 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022610-CVE-2022-49518-082d@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.