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

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-02)
- Published: 2026-09-11T19:45:36.268Z
- Modified: 2026-10-30T13:20:23.873Z
- Assigned by: Linux

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

(As written by CVE List.)

## Affected

- Linux Linux: from 5f9a8a51d8b95505d8de8b7191ae2ed8c504d4af before 8d264d35df981e943171ddc09cd6cc1d38c65e17; from 5f9a8a51d8b95505d8de8b7191ae2ed8c504d4af before cb732d302245b14943a5017015fffa8e6db7a6c0; from 5f9a8a51d8b95505d8de8b7191ae2ed8c504d4af before b7c873765875645b11503f94c9bae2ca80127375; from 5f9a8a51d8b95505d8de8b7191ae2ed8c504d4af before f42efd634c0ae7ba0ce2fc5e30e291b0803b0ae2; from 5f9a8a51d8b95505d8de8b7191ae2ed8c504d4af before 05a1a816eef8b3e4332620a64fc8cf45c4eb5c0d; from 5f9a8a51d8b95505d8de8b7191ae2ed8c504d4af before 3f950867c307c5413d628a153ac44915bd117ffd; 4.7 (not affected: before 4.7; from 6.1.191 up to 6.1.*; from 6.6.160 up to 6.6.*; from 6.12.111 up to 6.12.*; from 6.18.50 up to 6.18.*; from 7.2.4 up to 7.2.*; from 7.3 up to *)

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

## Sources

- CVE List: [CVE-2026-89644](https://www.cve.org/CVERecord?id=CVE-2026-89644), CVE Terms of Use, modified 2026-10-30
- NVD: [CVE-2026-89644](https://nvd.nist.gov/vuln/detail/CVE-2026-89644), Public domain, modified 2026-10-30

---

Page: https://cve.day/CVE-2026-89644 · Whole record: https://cve.day/CVE-2026-89644.json · Rebuilt by cve.day 2026-11-25T22:59:38.096Z
