CVE-2026-31475 Details
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.
A double free vulnerability has been identified in the Linux kernel's ASoC SMA1307 codec driver. This issue arises because the driver improperly manages memory allocated with devm_kzalloc(), a function that provides device-managed resources. The vulnerability occurs in the sma1307_setting_loaded() function, where a manual cleanup of the mode_set entries incorrectly uses kfree() instead of allowing the device resource management system to handle it. This mismanagement can lead to a double free error when the memory is released twice, causing potential instability or security issues.
The vulnerability has been addressed by modifying the error handling in the sma1307_setting_loaded() function. The manual kfree() loop has been removed, allowing the device resource management system to properly handle the cleanup of allocated resources. Users should update to the latest version of the Linux kernel where this fix has been applied.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/1a82c3272626db9006f4c2cad3adf2916417aed6 | kernel.org | Patch |
| https://git.kernel.org/stable/c/d472d1a52985211b92883bb64bbe710b45980190 | kernel.org | Patch |
| https://git.kernel.org/stable/c/fe757092d2329c397ecb32f2bf68a5b1c4bd9193 | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-415 | Double Free | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 6.14.9, < 6.15 >= 6.15.1, < 6.18.21 >= 6.19, < 6.19.11 6.15 - 7.0 rc1 7.0 rc2 7.0 rc3 7.0 rc4 7.0 rc5 7.0 rc6 7.0 rc7 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | kernel.org |
| Apr 27, 2026 | Initial Analysis | [email protected] |
| Apr 27, 2026 | CVE Modified | kernel.org |
| Apr 22, 2026 | New CVE Received | kernel.org |