# CVE-2025-39935: ASoC: codec: sma1307: Fix memory corruption in sma1307_setting_loaded()

- Severity: High 7.8 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.15%, higher than 4% of CVEs (2026-12-01)
- Published: 2025-10-04T07:30:59.102Z
- Modified: 2026-10-19T21:10:00.160Z
- Weaknesses: CWE-787
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from 576c57e6b4c1d734bcb7cc33dde9a99a9383b520 before cd59ca8f75dbb42a67fcae975c766114644e36c4; from 576c57e6b4c1d734bcb7cc33dde9a99a9383b520 before 78338108b5a856dc98223a335f147846a8a18c51; 6.13 (not affected: before 6.13; from 6.16.9 up to 6.16.*; from 6.17 up to *)
- linux linux_kernel: from 6.13 before 6.16.9; 6.17

## Every score

- Linux: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://git.kernel.org/stable/c/cd59ca8f75dbb42a67fcae975c766114644e36c4> (patch)
- <https://git.kernel.org/stable/c/78338108b5a856dc98223a335f147846a8a18c51> (patch)

## Sources

- CVE List: [CVE-2025-39935](https://www.cve.org/CVERecord?id=CVE-2025-39935), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2025-39935](https://nvd.nist.gov/vuln/detail/CVE-2025-39935), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2025-39935 · Whole record: https://cve.day/CVE-2025-39935.json · Rebuilt by cve.day 2026-11-25T22:59:05.517Z
