CVE-2025-39935

Source
https://cve.org/CVERecord?id=CVE-2025-39935
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39935.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2025-39935
Downstream
Published
2025-10-04T07:30:59.102Z
Modified
2026-04-02T12:48:13.056036Z
Summary
ASoC: codec: sma1307: Fix memory corruption in sma1307_setting_loaded()
Details

In the Linux kernel, the following vulnerability has been resolved:

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

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 devmkmallocarray() to allocate the memory instead.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/39xxx/CVE-2025-39935.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
576c57e6b4c1d734bcb7cc33dde9a99a9383b520
Fixed
cd59ca8f75dbb42a67fcae975c766114644e36c4
Fixed
78338108b5a856dc98223a335f147846a8a18c51

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-39935.json"