CVE-2025-39935

ASoC: codec: sma1307: Fix memory corruption in sma1307_setting_loaded()

HIGH
7.8
CVSS Score
Published: October 4, 2025 at 07:30 AM UTC
Updated: October 19, 2026 at 09:10 PM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.8
Exploit prediction
EPSS 0.1%

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

6.13 ≤ v < 6.16.9576c57e6b4c1d734bcb7cc33dde9a99a9383b5206.176.17 rc16.17 rc26.17 rc36.17 rc46.17 rc56.17 rc6
Vendor states this is fixed in 78338108b5a856dc98223a335f147846a8a18c51 (fixed)
Vendor states this is fixed in cd59ca8f75dbb42a67fcae975c766114644e36c4 (fixed)
Vendor states this is fixed in 6.13 (unaffected)
Vendor states this is fixed in 6.16.9 (unaffected)
Vendor states this is fixed in 6.17 (unaffected)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

CVSS

7.8HIGHLinux
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-787

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card