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

High 7.1 Published Updated

A crafted topology file can cause an out-of-bounds read in the Linux kernel's SOF driver, potentially leading to system crashes or information leaks.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-49518?

CVE-2022-49518 is a high-severity memory corruption vulnerability in Linux kernel, published on 26 Feb 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

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.

Weakness: CWE-125

Which versions are affected by CVE-2022-49518?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-49518?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2022-49518 being exploited?

There is no known exploitation of CVE-2022-49518 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-49518, GHSA-38r6-jgr4-hw3h, ROOT-OS-UBUNTU-2204-CVE-2022-49518, UBUNTU-CVE-2022-49518.

Is CVE-2022-49518 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free