CVE-2025-39935 ASoC: codec: sma1307: Fix memory corruption in sma1307_setting_loaded()
A memory corruption vulnerability in the Linux kernel SMA1307 audio codec driver allows attackers to execute arbitrary code or escalate privileges.
- 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-2025-39935?
CVE-2025-39935 is a high-severity memory corruption vulnerability in Linux kernel, published on 4 Oct 2025. 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:
ASoC: codec: sma1307: Fix memory corruption in sma1307_setting_loaded()
The sma1307->set.header_size is how many integers are in the header (there are 8 of them) but instead of allocating space of 8 integers we allocate 8 bytes. This leads to memory corruption when we copy data it on the next line:
memcpy(sma1307->set.header, data, sma1307->set.header_size * sizeof(int));
Also since we're immediately copying over the memory in ->set.header, there is no need to zero it in the allocator. Use devm_kmalloc_array() to allocate the memory instead.
Weakness: CWE-787
Which versions are affected by CVE-2025-39935?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-39935?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2025-39935 being exploited?
There is no known exploitation of CVE-2025-39935 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as BELL-CVE-2025-39935, DEBIAN-CVE-2025-39935, GHSA-9554-w67x-xjxp, UBUNTU-CVE-2025-39935.