ASoC: SOF: ipc4-control: Fix TOCTOU in sof_ipc4_bytes_put
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
In the Linux kernel’s ASoC SOF ipc4-control code, sof_ipc4_bytes_put uses the previous buffer size when copying incoming data. If the incoming size differs, the copy can truncate valid data or include stale bytes. The input does not specify attacker access requirements or user interaction.
Engineers running Linux kernels with the affected ASoC SOF ipc4-control code should check their installations; affected versions are not specified.