CVE-2026-31475: ASoC: sma1307: fix double free of devm_kzalloc() memory

Published Apr 22, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

ASoC: sma1307: fix double free of devmkzalloc() memory

A previous change added NULL checks and cleanup for allocation failures in sma1307settingloaded().

However, the cleanup for modeset entries is wrong. Those entries are allocated with devmkzalloc(), 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.

Affected Software

12 affected components
Linux ASoC sma1307 driver
Linux Linux kernel>=6.14.9<6.15
Linux Linux kernel>=6.15.1<6.18.21
Linux Linux kernel>=6.19<6.19.11
Linux Linux kernel=6.15
Linux Linux kernel=7.0-rc1
Linux Linux kernel=7.0-rc2
Linux Linux kernel=7.0-rc3
Linux Linux kernel=7.0-rc4
Linux Linux kernel=7.0-rc5
Linux Linux kernel=7.0-rc6
Linux Linux kernel=7.0-rc7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    In sma1307_setting_loaded() error path, remove the manual kfree() loop for mode_set entries; those entries are allocated with devm_kzalloc() and must not be freed with kfree(). Let devres (device-managed cleanup) release them.

    ASoC sma1307 driver Error-path cleanup for mode_set entries allocated with devm_kzalloc() = Do not manually free (remove kfree())

Event History

Apr 22, 2026
CVE Published
via MITRE·01:54 PM
Data Sourced
via MITRE·01:54 PM
DescriptionSeverity
Data Sourced
via NVD·02:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-31475?

CVE-2026-31475 has a severity score of 7.8, which is classified as high.

2

How do I fix CVE-2026-31475?

To fix CVE-2026-31475, update the Linux kernel to the latest version where the vulnerability has been resolved.

3

What type of vulnerability is CVE-2026-31475?

CVE-2026-31475 is categorized as a Double Free vulnerability.

4

Which software is affected by CVE-2026-31475?

CVE-2026-31475 affects the Linux kernel and specifically the Linux ASoC sma1307 driver.

5

What is the potential impact of CVE-2026-31475?

The potential impact of CVE-2026-31475 includes memory corruption leading to denial of service or code execution.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203