CVE-2025-39935: ASoC: codec: sma1307: Fix memory corruption in sma1307_setting_loaded()
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.
Security readout for executives and security teams
Plain-English summary
A Linux audio codec driver allocates too little memory for an eight-integer header, then copies the full header into that undersized space. The resulting memory corruption could let a local, low-privileged attacker compromise confidentiality, integrity, or availability when the vulnerable driver path is reachable.
Executive priority
Treat this as a high-priority kernel update for devices using the affected audio codec. It is not supported as an internet-wide emergency because exploitation requires local access and driver reachability. Promptly identify exposed systems, confirm vendor backports, and remediate them through normal kernel maintenance controls.
Technical view
In sma1307_setting_loaded(), header_size represents an integer count, but the original allocation treated it as a byte count. The following memcpy multiplies header_size by sizeof(int), overflowing the allocation. The referenced Linux stable changes replace the allocation with an array-aware allocation sized for the required integers.
Likely exposure
Exposure is most likely on Linux systems using the SMA1307 ASoC codec driver. The bundle identifies Linux 6.13, 6.16.9, and 6.17 as affected entries, but does not clearly define complete version ranges or distribution backports. Systems without this driver path are less likely exposed.
Exploitation context
The CVSS vector indicates local access, low attack complexity, low privileges, and no user interaction. The bundle does not establish how an attacker controls the copied data or how reliably the condition is exploitable. This CVE is not listed as KEV, and the supplied sources provide no evidence of active exploitation.
Researcher notes
The defect is a heap allocation-size mismatch followed immediately by an oversized copy. No CWE is supplied. The source bundle does not document the complete affected-version ranges, attacker-controlled input path, exploit reliability, distribution status, or observed attacks; those gaps limit exposure conclusions.
Mitigation direction
Update to a vendor-supported kernel release incorporating one of the referenced stable fixes.
Prioritize systems confirmed to use the SMA1307 ASoC codec driver.
If updating is delayed, consult the Linux distribution vendor for supported exposure-reduction guidance.
Track vendor backports because package versions may not map directly to upstream versions.
Validation and detection
Inventory kernel versions on systems using the SMA1307 audio codec driver.
Check distribution advisories or source history for inclusion of the referenced fix commits.
Confirm the corrected code allocates header_size integer elements, not header_size bytes.
After updating, verify the running kernel is remediated and audio functionality remains stable.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-39935 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
0ADP providers
3Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.