CVE-2026-31475
Received Received - Intake

Double Free Vulnerability in Linux Kernel ASoC sma1307 Memory Management

Vulnerability report for CVE-2026-31475, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-04-22

Last updated on: 2026-04-27

Assigner: kernel.org

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-04-22
Last Modified
2026-04-27
Generated
2026-07-06
AI Q&A
2026-04-22
EPSS Evaluated
2026-07-05
NVD
EUVD

Affected Vendors & Products

Showing 11 associated CPEs
Vendor Product Version / Range
linux linux_kernel 6.15
linux linux_kernel From 6.14.9 (inc) to 6.15 (exc)
linux linux_kernel 7.0
linux linux_kernel 7.0
linux linux_kernel 7.0
linux linux_kernel 7.0
linux linux_kernel 7.0
linux linux_kernel 7.0
linux linux_kernel 7.0
linux linux_kernel From 6.19 (inc) to 6.19.11 (exc)
linux linux_kernel From 6.15.1 (inc) to 6.18.21 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-415 The product calls free() twice on the same memory address.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability is a double free issue in the Linux kernel's ASoC sma1307 driver. Specifically, memory allocated with devm_kzalloc() for mode_set entries was incorrectly freed manually using kfree() in an error path. Since devm_kzalloc() allocates device-managed resources that are automatically freed later, manually freeing them causes a double free when the device resource management (devres) tries to release the same memory again.

The fix involved removing the manual kfree() calls and allowing devres to handle the cleanup properly.

Impact Analysis

A double free vulnerability can lead to undefined behavior such as memory corruption, system crashes, or potential exploitation by attackers to execute arbitrary code or escalate privileges. In this case, the improper manual freeing of device-managed memory in the Linux kernel could destabilize the system or be leveraged for malicious purposes.

Mitigation Strategies

To mitigate this vulnerability, update the Linux kernel to a version where the sma1307 double free issue has been fixed.

The fix involves removing manual kfree() calls for device-managed memory allocations in the sma1307 driver and relying on devres to handle cleanup properly.

Therefore, applying the official patch or upgrading to a kernel release that includes this fix is the recommended immediate step.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-31475. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart