CVE-2025-71286: ASoC: SOF: ipc4-topology: Correct the allocation size for bytes controls
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ASoC: SOF: ipc4-topology: Correct the allocation size for bytes controls
The size of the data behind of scontrol->ipc_control_data for bytes controls is:
[1] sizeof(struct sof_ipc4_control_data) + // kernel only struct
[2] sizeof(struct sof_abi_hdr)) + payload
The max_size specifies the size of [2] and it is coming from topology.
Change the function to take this into account and allocate adequate amount of memory behind scontrol->ipc_control_data.
With the change we will allocate [1] amount more memory to be able to hold the full size of data.
The Linux kernel CVE team has assigned CVE-2025-71286 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.4 with commit a382082ff74b036944cbc5b6ad29b65f633acd3a and fixed in 6.6.128 with commit 59fe643f21b9d59bcbedb0dfbf988ee455c23736 Issue introduced in 6.4 with commit a382082ff74b036944cbc5b6ad29b65f633acd3a and fixed in 6.12.75 with commit 491956b45b5f4933632ea6d8a8bdfdf045ab81e1 Issue introduced in 6.4 with commit a382082ff74b036944cbc5b6ad29b65f633acd3a and fixed in 6.18.16 with commit a704a1a4394b5877b9adc31b2c3165ad0b541896 Issue introduced in 6.4 with commit a382082ff74b036944cbc5b6ad29b65f633acd3a and fixed in 6.19.6 with commit 1237cd9ff198cb882402572f29569e5247190974 Issue introduced in 6.4 with commit a382082ff74b036944cbc5b6ad29b65f633acd3a and fixed in 7.0 with commit a653820700b81c9e6f05ac23b7969ecec1a18e85
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2025-71286
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
sound/soc/sof/ipc4-topology.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/59fe643f21b9d59bcbedb0dfbf988ee455c23736 https://git.kernel.org/stable/c/491956b45b5f4933632ea6d8a8bdfdf045ab81e1 https://git.kernel.org/stable/c/a704a1a4394b5877b9adc31b2c3165ad0b541896 https://git.kernel.org/stable/c/1237cd9ff198cb882402572f29569e5247190974 https://git.kernel.org/stable/c/a653820700b81c9e6f05ac23b7969ecec1a18e85