CVE-2024-41056: firmware: cs_dsp: Use strnlen() on name fields in V1 wmfw files
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
firmware: cs_dsp: Use strnlen() on name fields in V1 wmfw files
Use strnlen() instead of strlen() on the algorithm and coefficient name string arrays in V1 wmfw files.
In V1 wmfw files the name is a NUL-terminated string in a fixed-size array. cs_dsp should protect against overrunning the array if the NUL terminator is missing.
The Linux kernel CVE team has assigned CVE-2024-41056 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.16 with commit f6bc909e7673 and fixed in 6.1.100 with commit 16d76857d6b5 Issue introduced in 5.16 with commit f6bc909e7673 and fixed in 6.6.41 with commit 392cff2f86a2 Issue introduced in 5.16 with commit f6bc909e7673 and fixed in 6.9.10 with commit 53a9f8cdbf35 Issue introduced in 5.16 with commit f6bc909e7673 and fixed in 6.10 with commit 680e126ec040
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-2024-41056
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:
drivers/firmware/cirrus/cs_dsp.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/16d76857d6b5426f41b587d0bb925de3f25bfb21 https://git.kernel.org/stable/c/392cff2f86a25a4286ff3151c7739143c61c1781 https://git.kernel.org/stable/c/53a9f8cdbf35a682e9894e1a606f4640e5359185 https://git.kernel.org/stable/c/680e126ec0400f6daecf0510c5bb97a55779ff03