CVE-2026-89644

btrfs: fix extent map leak in NOCOW direct I/O write

State
Published
Severity
Not scored
Published
Sep 11, 2026
Updated
Oct 30, 2026
Reserved
Sep 11, 2026

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 5f9a8a51d8b95505d8de8b7191ae2ed8c504d4af to before 8d264d35df981e943171ddc09cd6cc1d38c65e17Affected
  • 5f9a8a51d8b95505d8de8b7191ae2ed8c504d4af to before cb732d302245b14943a5017015fffa8e6db7a6c0Affected
  • 5f9a8a51d8b95505d8de8b7191ae2ed8c504d4af to before b7c873765875645b11503f94c9bae2ca80127375Affected
  • 5f9a8a51d8b95505d8de8b7191ae2ed8c504d4af to before f42efd634c0ae7ba0ce2fc5e30e291b0803b0ae2Affected
  • 5f9a8a51d8b95505d8de8b7191ae2ed8c504d4af to before 05a1a816eef8b3e4332620a64fc8cf45c4eb5c0dAffected
  • 5f9a8a51d8b95505d8de8b7191ae2ed8c504d4af to before 3f950867c307c5413d628a153ac44915bd117ffdAffected
LinuxLinux
  • 4.7Affected
  • before 4.7Not affected
  • 6.1.191 through 6.1.*Not affected
  • 6.6.160 through 6.6.*Not affected
  • 6.12.111 through 6.12.*Not affected
  • 6.18.50 through 6.18.*Not affected
  • 7.2.4 through 7.2.*Not affected
  • 7.3 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.