Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2025-39935

published high CVSS 3.1 · 7.8

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

Published
04 Oct 2025, 07:30:59 UTC
Updated
05 Aug 2026, 12:06:13 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux576c57e6b4c1d734bcb7cc33dde9a99a9383b520 to < cd59ca8f75dbb42a67fcae975c766114644e36c4 · 576c57e6b4c1d734bcb7cc33dde9a99a9383b520 to < 78338108b5a856dc98223a335f147846a8a18c51 · Other versions: unaffected Affected Not stated Linux
Linux — Linux6.13 (affected) · 0 to < 6.13 (unaffected · semver) · 6.16.9 through 6.16.* (unaffected · semver) · 6.17 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment

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.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

0

No linked advisories were found for this CVE.

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The vulnerable code is reached through a local ALSA mixer control write (`SNDRV_CTL_IOCTL_ELEM_WRITE` on `/dev/snd/controlC*` → `sma1307_reset_put()` → `sma1307_reset()` → `sma1307_setting_loaded()`), or at driver probe on an I2C-attached codec. There is no network or adjacent-network reachability. AC:L - The mismatch is unconditional — `devm_kzalloc(dev, 8)` followed by a 32-byte `memcpy` overflows on every single settings load, with no race, no timing window, and no memory-layout precondition. The attacker can re-trigger it arbitrarily many times via the "Reset Switch" control, and the accompanying devres leak provides repeatable heap grooming. PR:L - Triggering requires only write access to the sound control device (`root:audio 0660`, plus logind ACL for the active session user; the audio server on Android) — an ordinary unprivileged local account, with no capability check anywhere along `snd_ctl_elem_write()` → `sma1307_reset_put()`. UI:N - The attacker writes the mixer control directly from their own process; no victim action, no file open, and no administrator step is needed. The probe-time path also fires automatically at boot. S:U - The out-of-bounds write corrupts kernel slab memory within the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed. C:H - The `memcpy` reads 32 bytes from a `kzalloc(fw->size)` buffer that may be as small as 8 bytes, disclosing up to 24 bytes of adjacent kernel heap into `set.header` (readable back through the driver's binary/register paths). More broadly, an adjacent-slab-object overwrite of SLUB freelist metadata is a well-established route to an arbitrary kernel read primitive. I:H - This is a 24-byte heap buffer overflow that writes past the `kmalloc-64` devres object into the neighbouring slab allocation, corrupting whatever kernel object or SLUB freelist pointer sits there. Combined with the repeatable-allocation grooming primitive, this is exploitable for controlled memory corruption and privilege escalation, especially where the firmware file content is attacker-influenceable. A:H - Slab corruption of an adjacent object reliably produces oopses/panics (immediate KASAN slab-out-of-bounds report on instrumented kernels), and each "Reset Switch" write additionally leaks devres allocations for `header`, `def`, and all `mode_set[]` entries without freeing the previous ones, allowing an unprivileged user to exhaust kernel memory.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 576c57e6b4c1d734bcb7cc33dde9a99a9383b520 to < cd59ca8f75dbb42a67fcae975c766114644e36c4 (affected · git)576c57e6b4c1d734bcb7cc33dde9a99a9383b520 to < 78338108b5a856dc98223a335f147846a8a18c51 (affected · git)Default: unaffected Linux · cna
Linux Linux 6.13 (affected)0 to < 6.13 (unaffected · semver)6.16.9 through 6.16.* (unaffected · semver)6.17 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

2

Provider assertions

1

Linux · cna

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

Provenance

Schema
5.2
Searchable
yes
Content hash
ddd69cdc9d72652620003f9a39f1554a9b3cf22a50d4e36ad490e9203fcf8202
Ingested
23 Sep 2026, 08:47:06 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected