CVE-2025-39935
kernel: ASoC: codec: sma1307: Fix memory corruption in sma1307_setting_loaded()
Overview
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.
Source: OX vulnerability database
Severity
7.8 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Weakness: CWE-787
Affected packages · 0
No registry package. This ID affects operating system packages only.
Operating systems · 1 fix
debian 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 14 | linux | 6.16.9-1 |
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2025-39935
- git.kernel.org https://git.kernel.org/stable/c/78338108b5a856dc98223a335f147846a8a18c51
- git.kernel.org https://git.kernel.org/stable/c/cd59ca8f75dbb42a67fcae975c766114644e36c4
- lore.kernel.org https://lore.kernel.org/linux-cve-announce/2025100417-CVE-2025-39935-3e6a@gregkh/T
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2025-39935
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2025-39935
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.