CVE-2026-72304: ASoC: SOF: ipc4-control: Fix TOCTOU in sof_ipc4_bytes_put
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ASoC: SOF: ipc4-control: Fix TOCTOU in sof_ipc4_bytes_put
In sof_ipc4_bytes_put(), the copy size is derived from the old data->size in the buffer rather than the incoming new data's size field from ucontrol. If the new data has a different size, the copy uses the wrong length: it may truncate valid data or copy stale bytes.
Fix by validating and using the incoming data's sof_abi_hdr.size from ucontrol before copying.
The Linux kernel CVE team has assigned CVE-2026-72304 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.4 with commit a062c8899fede2ab5660a817e9b602d3fa280a99 and fixed in 6.6.145 with commit 266f936db83aee6ca6473bbb06259bda52bf4fc3 Issue introduced in 6.4 with commit a062c8899fede2ab5660a817e9b602d3fa280a99 and fixed in 6.12.97 with commit 4cf6a7ebbf8787393b158b2cc341723e5bebc4a8 Issue introduced in 6.4 with commit a062c8899fede2ab5660a817e9b602d3fa280a99 and fixed in 6.18.40 with commit fb4293173db2d474d8fbc0e5ecf4943e6df2b40e Issue introduced in 6.4 with commit a062c8899fede2ab5660a817e9b602d3fa280a99 and fixed in 7.1.5 with commit 038406abde0d0883419ec89425ea941ec8bbef95 Issue introduced in 6.4 with commit a062c8899fede2ab5660a817e9b602d3fa280a99 and fixed in 7.2-rc1 with commit 3ad673e7139cf214afd24321a829aad6575f4163
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-2026-72304
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-control.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/266f936db83aee6ca6473bbb06259bda52bf4fc3 https://git.kernel.org/stable/c/4cf6a7ebbf8787393b158b2cc341723e5bebc4a8 https://git.kernel.org/stable/c/fb4293173db2d474d8fbc0e5ecf4943e6df2b40e https://git.kernel.org/stable/c/038406abde0d0883419ec89425ea941ec8bbef95 https://git.kernel.org/stable/c/3ad673e7139cf214afd24321a829aad6575f4163