CVE-2026-72301: ASoC: SOF: ipc3-control: Fix TOCTOU in bytes_put and bytes_get
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
ASoC: SOF: ipc3-control: Fix TOCTOU in bytes_put and bytes_get
In sof_ipc3_bytes_put(), the size used for the memcpy is derived from the old data->size already in the buffer, not the incoming new data's size field. If the new data has a different size, the copy length is
wrong: it may truncate valid data or copy stale bytes.
Similarly, sof_ipc3_bytes_get() checks data->size against max_size without accounting for the sizeof(struct sof_ipc_ctrl_data) offset of the flex array within the allocation.
Fix bytes_put to validate and use the incoming data's sof_abi_hdr.size from ucontrol before copying. Fix bytes_get to subtract sizeof(*cdata) from the bounds check to match the actual available space.
The Linux kernel CVE team has assigned CVE-2026-72301 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.18 with commit 544ac8858f249950b4d99c68e538cdc07300528f and fixed in 6.1.178 with commit 8bd715a9d882fe1993bb2aec5eff89fffa946592 Issue introduced in 5.18 with commit 544ac8858f249950b4d99c68e538cdc07300528f and fixed in 6.6.145 with commit 0dce240145f47545d2e4b18c6d58033b83e1fd0e Issue introduced in 5.18 with commit 544ac8858f249950b4d99c68e538cdc07300528f and fixed in 6.12.97 with commit ed4f758f34be4c32e02933ac4fa044589d9c1c16 Issue introduced in 5.18 with commit 544ac8858f249950b4d99c68e538cdc07300528f and fixed in 6.18.40 with commit 0c4fbdaca225b97122b61b68c5353caa33a253c3 Issue introduced in 5.18 with commit 544ac8858f249950b4d99c68e538cdc07300528f and fixed in 7.1.5 with commit 92f90917413bdd6078fefff6f6c83a07bf870b04 Issue introduced in 5.18 with commit 544ac8858f249950b4d99c68e538cdc07300528f and fixed in 7.2-rc1 with commit 1f97760417b5faa60e9642fd0ed61eb17d0b1b39
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-72301
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/ipc3-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/8bd715a9d882fe1993bb2aec5eff89fffa946592 https://git.kernel.org/stable/c/0dce240145f47545d2e4b18c6d58033b83e1fd0e https://git.kernel.org/stable/c/ed4f758f34be4c32e02933ac4fa044589d9c1c16 https://git.kernel.org/stable/c/0c4fbdaca225b97122b61b68c5353caa33a253c3 https://git.kernel.org/stable/c/92f90917413bdd6078fefff6f6c83a07bf870b04 https://git.kernel.org/stable/c/1f97760417b5faa60e9642fd0ed61eb17d0b1b39