Junglewise Threat Intelligence

CVE-2025-37931: Linux Kernel Btrfs file system corruption in metadata writeback

CVE-2025-37931 · Severity: medium · CVSS 5.5 · Published 2025-05-20

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability in the Linux kernel's Btrfs file system can lead to data corruption or system instability. On certain hardware configurations, the system may fail to save modified data to the disk correctly. This could result in the loss of important information or a corrupted file system that requires manual repair.

Technical details

A logic error exists in the Btrfs subpage metadata writeback path within 'fs/btrfs/extent_io.c'. When scanning the subpage bitmap for dirty ranges on systems with large page sizes (e.g., 64k) and smaller node sizes (e.g., 16k), the kernel incorrectly increments the bitmap pointer by a single bit ('bit_start++') instead of the full node size when a range is clean. This misalignment causes subsequent dirty blocks to be calculated with incorrect offsets, leading to failed radix tree lookups and skipped writeouts of dirty extent buffers. The vulnerability results in tree log corruption and affects all metadata writes under impacted configurations. Patches have been released for various stable kernel branches including 6.1.y, 6.6.y, 6.12.y, and 6.14.y.

Affected products

  • Linux Linux Kernel 5.13 to 6.1.151, 6.2 to 6.6.105, 6.7 to 6.12.28, 6.13 to 6.14.6

Timeline

  • 2025-04-14: other: Patch authored by Josef Bacik
  • 2025-05-20: disclosed: CVE published

References

Related threats