CVE-2026-31475
published high CVSS 3.1 · 7.8ASoC: sma1307: fix double free of devm_kzalloc() memory
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux0ec6bd16705fe21d6429d6b8f7981eae2142bba8 to < d472d1a52985211b92883bb64bbe710b45980190 · 0ec6bd16705fe21d6429d6b8f7981eae2142bba8 to < 1a82c3272626db9006f4c2cad3adf2916417aed6 · 0ec6bd16705fe21d6429d6b8f7981eae2142bba8 to < fe757092d2329c397ecb32f2bf68a5b1c4bd9193 · f8434b8ba437d3f6cbcd9ffe8405bd16ed28fc5c · 6.14.9 to < 6.15 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux6.15 (affected) · 0 to < 6.15 (unaffected · semver) · 6.18.21 through 6.18.* (unaffected · semver) · 6.19.11 through 6.19.* (unaffected · semver) · 7.0 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: sma1307: fix double free of devm_kzalloc() memory A previous change added NULL checks and cleanup for allocation failures in sma1307_setting_loaded(). However, the cleanup for mode_set entries is wrong. Those entries are allocated with devm_kzalloc(), so they are device-managed resources and must not be freed with kfree(). Manually freeing them in the error path can lead to a double free when devres later releases the same memory. Drop the manual kfree() loop and let devres handle the cleanup.
Related advisories
Vendor advisories explicitly linked to this CVE.
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 path is reachable locally through the ALSA control ioctl for the SMA1307 "Reset Switch", which calls `sma1307_reset()` and then `sma1307_setting_loaded()`. There is no network, Bluetooth, WiFi, or other remote packet path to this I2C audio codec driver. AC:L - Once an affected SMA1307 device and setting firmware are present, an attacker can repeatedly invoke the reset control to drive the firmware-loading allocations until the `mode_set` allocation failure path is reached. The attacker influences the memory-pressure condition and there is no race requiring victim-controlled timing. PR:L - The ioctl path requires local access to the ALSA control device, but the kernel control write path does not require CAP_SYS_ADMIN or real root. This is consistent with a basic local user who has access to the sound card controls. UI:N - The attacker can trigger the reset control directly via an ioctl. No separate victim action is required. S:U - The corruption occurs in kernel memory within the same host kernel security authority. It does not cross a VM, IOMMU, or similar security boundary. C:H - The bug frees devm-managed heap memory with the wrong API, leaving stale devres ownership and creating a double-free/use-after-free style kernel heap corruption condition. Such corruption can reasonably be leveraged for kernel memory disclosure. I:H - Kernel heap double-free/use-after-free corruption can be shaped into arbitrary write or control-flow corruption. Under the required overestimation rule, integrity impact is High. A:H - The invalid/double free can trigger allocator corruption, kernel warnings/oopses, or panic during the error path or later devres release. Repeated triggering can therefore cause full kernel availability loss.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 0ec6bd16705fe21d6429d6b8f7981eae2142bba8 to < d472d1a52985211b92883bb64bbe710b45980190 (affected · git)0ec6bd16705fe21d6429d6b8f7981eae2142bba8 to < 1a82c3272626db9006f4c2cad3adf2916417aed6 (affected · git)0ec6bd16705fe21d6429d6b8f7981eae2142bba8 to < fe757092d2329c397ecb32f2bf68a5b1c4bd9193 (affected · git)f8434b8ba437d3f6cbcd9ffe8405bd16ed28fc5c (affected · git)6.14.9 to < 6.15 (affected · semver)Default: unaffected | Linux · cna |
| Linux | Linux | 6.15 (affected)0 to < 6.15 (unaffected · semver)6.18.21 through 6.18.* (unaffected · semver)6.19.11 through 6.19.* (unaffected · semver)7.0 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
3Provider assertions
1Linux · cna
ASoC: sma1307: fix double free of devm_kzalloc() memory
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 4119bb50598f5420d75df79f54f0c897fdfb25d8dc5b0ad8430c941d477cb157
- Ingested
- 23 Sep 2026, 09:09:24 UTC
- Source record
- Official CVE record