CVE-2024-41039 firmware: cs_dsp: Fix overflow checking of wmfw header
A buffer overflow in the Linux kernel's cs_dsp firmware handler allows attackers to cause denial of service or execute arbitrary code via crafted firmware files.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-41039?
CVE-2024-41039 is a high-severity vulnerability in Linux kernel, published on 29 Jul 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
firmware: cs_dsp: Fix overflow checking of wmfw header
Fix the checking that firmware file buffer is large enough for the wmfw header, to prevent overrunning the buffer.
The original code tested that the firmware data buffer contained enough bytes for the sums of the size of the structs
wmfw_header + wmfw_adsp1_sizes + wmfw_footer
But wmfw_adsp1_sizes is only used on ADSP1 firmware. For ADSP2 and Halo Core the equivalent struct is wmfw_adsp2_sizes, which is 4 bytes longer. So the length check didn't guarantee that there are enough bytes in the firmware buffer for a header with wmfw_adsp2_sizes.
This patch splits the length check into three separate parts. Each of the wmfw_header, wmfw_adsp?_sizes and wmfw_footer are checked separately before they are used.
Weakness: CWE-120
Which versions are affected by CVE-2024-41039?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2024-41039?
Apply the vendor's patch.
Is CVE-2024-41039 being exploited?
There is no known exploitation of CVE-2024-41039 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2024-41039, DEBIAN-CVE-2024-41039, GHSA-fxx9-w28j-5rc5, UBUNTU-CVE-2024-41039.