CVE-2025-39935

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

State
Published
Severity
7.8 High
Published
Oct 4, 2025
Updated
Aug 5, 2026
Reserved
Apr 16, 2025

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.17.8 HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HLinux

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 576c57e6b4c1d734bcb7cc33dde9a99a9383b520 to before cd59ca8f75dbb42a67fcae975c766114644e36c4Affected
  • 576c57e6b4c1d734bcb7cc33dde9a99a9383b520 to before 78338108b5a856dc98223a335f147846a8a18c51Affected
LinuxLinux
  • 6.13Affected
  • before 6.13Not affected
  • 6.16.9 through 6.16.*Not affected
  • 6.17 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.