CVE-2024-44972: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: btrfs: do not clear page dirty inside extent_write_locked_range() [BUG] For subpage + zoned case, the following workload can lead to rsv data leak at unmount time: # mkfs.btrfs -f -s 4k $dev # mount $dev $mnt # fsstress -w -n 8 -d $mnt -s 1709539240 0/0: fiemap - no filename 0/1: copyrange read - no filename 0/2: write - no filename 0/3: rename - no source filename 0/4: creat f0 x:0 0 0 0/4: creat add id=0,parent=-1 0/5: writev f0[259 1 0 0 0 0] [778052,113,965] 0 0/6: ioctl(FIEMAP) f0[259 1 0 0 224 887097] [1294220,2291618343991484791,0x10000] -1 0/7: dwrite - xfsctl(XFS_IOC_DIOINFO) f0[259 1 0 0 224 887097] return 25, fallback to stat() 0/7: dwrite f0[259 1 0 0 224 887097] [696320,102400] 0 # umount $mnt The dmesg includes the following rsv leak detection warning (all call trace skipped): ------------[ cut here ]------------ WARNING: CPU: 2 PID: 4528 at fs/btrfs/inode.c:8653 btrfs_destroy_inode+0x1e0/0x200 [btrfs] ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 2 PID: 4528 at fs/btrfs/inode.c:8654 btrfs_destroy_inode+0x1a8/0x200 [btrfs] ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 2 PID: 4528 at fs/btrfs/inode.c:8660 btrfs_destroy_inode+0x1a0/0x200 [btrfs] ---[ end trace 0000000000000000 ]--- BTRFS info (device sda): last unmount of filesystem 1b4abba9-de34-4f07-9e7f-157cf12a18d6 ------------[ cut here ]------------ WARNING: CPU: 3 PID: 4528 at fs/btrfs/block-group.c:4434 btrfs_free_block_groups+0x338/0x500 [btrfs] ---[ end trace 0000000000000000 ]--- BTRFS info (device sda): space_info DATA has 268218368 free, is not full BTRFS info (device sda): space_info total=268435456, used=204800, pinned=0, reserved=0, may_use=12288, readonly=0 zone_unusable=0 BTRFS info (device sda): global_block_rsv: size 0 reserved 0 BTRFS info (device sda): trans_block_rsv: size 0 reserved 0 BTRFS info (device sda): chunk_block_rsv: size 0 reserved 0 BTRFS info (device sda): delayed_block_rsv: size 0 reserved 0 BTRFS info (device sda): delayed_refs_rsv: size 0 reserved 0 ------------[ cut here ]------------ WARNING: CPU: 3 PID: 4528 at fs/btrfs/block-group.c:4434 btrfs_free_block_groups+0x338/0x500 [btrfs] ---[ end trace 0000000000000000 ]--- BTRFS info (device sda): space_info METADATA has 267796480 free, is not full BTRFS info (device sda): space_info total=268435456, used=131072, pinned=0, reserved=0, may_use=262144, readonly=0 zone_unusable=245760 BTRFS info (device sda): global_block_rsv: size 0 reserved 0 BTRFS info (device sda): trans_block_rsv: size 0 reserved 0 BTRFS info (device sda): chunk_block_rsv: size 0 reserved 0 BTRFS info (device sda): delayed_block_rsv: size 0 reserved 0 BTRFS info (device sda): delayed_refs_rsv: size 0 reserved 0 Above $dev is a tcmu-runner emulated zoned HDD, which has a max zone append size of 64K, and the system has 64K page size. [CAUSE] I have added several trace_printk() to show the events (header skipped): > btrfs_dirty_pages: r/i=5/259 dirty start=774144 len=114688 > btrfs_dirty_pages: r/i=5/259 dirty part of page=720896 off_in_page=53248 len_in_page=12288 > btrfs_dirty_pages: r/i=5/259 dirty part of page=786432 off_in_page=0 len_in_page=65536 > btrfs_dirty_pages: r/i=5/259 dirty part of page=851968 off_in_page=0 len_in_page=36864 The above lines show our buffered write has dirtied 3 pages of inode 259 of root 5: 704K 768K 832K 896K I |////I/////////////////I///////////| I 756K 868K |///| is the dirtied range using subpage bitmaps. and 'I' is the page boundary. Meanwhile all three pages (704K, 768K, 832K) have their PageDirty flag set. > btrfs_direct_write: r/i=5/259 start dio filepos=696320 len=102400 Then direct IO writ ---truncated---
AI Analysis
Technical Summary
CVE-2024-44972 is a vulnerability identified in the Linux kernel's Btrfs filesystem implementation, specifically related to the handling of dirty pages within the extent_write_locked_range() function. The issue arises in scenarios involving subpage and zoned block devices, such as zoned HDDs emulated by tcmu-runner, where the maximum zone append size and system page size are both 64KB. Under certain workloads involving concurrent filesystem stress operations (e.g., fsstress with multiple threads performing writes, renames, and ioctl calls), the kernel fails to properly clear the dirty page flags during writeback operations. This leads to a reserved (rsv) data leak at unmount time, as indicated by kernel warnings and tracebacks in dmesg logs. The problem manifests as multiple warnings in the btrfs_destroy_inode() and btrfs_free_block_groups() functions, showing that block reservations are not correctly released, potentially causing resource leakage and filesystem inconsistencies. The root cause is linked to the improper handling of dirty page flags in subpage bitmaps during buffered and direct IO writes, which can cause the filesystem to retain stale or reserved data references after unmounting. While the vulnerability does not appear to allow direct code execution or privilege escalation, it compromises filesystem integrity and could lead to data leakage or corruption, especially on systems using Btrfs with zoned block devices. The vulnerability was disclosed and patched in September 2024, with no known exploits in the wild at the time of publication.
Potential Impact
For European organizations, the impact of CVE-2024-44972 primarily concerns data integrity and availability on systems using the Btrfs filesystem with zoned block devices or emulated zoned devices. Enterprises relying on Linux servers for critical storage, especially those using Btrfs for its advanced features like snapshots and checksumming, may experience filesystem inconsistencies or data leakage during unmount operations. This can lead to data corruption, loss of critical information, or degraded system reliability. Organizations in sectors such as finance, healthcare, and government that require high data integrity and availability could face operational disruptions. Additionally, the leakage of reserved data might expose sensitive information if attackers gain access to the affected storage devices. Although exploitation requires specific conditions (use of Btrfs on zoned devices and particular workloads), the widespread adoption of Linux and Btrfs in European data centers and cloud environments means the risk is non-negligible. The vulnerability does not require user interaction or elevated privileges to manifest, increasing the risk in multi-tenant or shared environments.
Mitigation Recommendations
To mitigate CVE-2024-44972, European organizations should: 1) Apply the latest Linux kernel patches that address this vulnerability as soon as they become available, ensuring that the Btrfs subsystem is updated to the fixed version. 2) Avoid using zoned block devices with Btrfs filesystems until patches are applied, or consider alternative filesystems that do not exhibit this issue for zoned storage. 3) Implement rigorous monitoring of kernel logs (dmesg) for warnings related to btrfs_destroy_inode and btrfs_free_block_groups to detect potential rsv leaks early. 4) Conduct regular filesystem integrity checks and backups to minimize data loss risks. 5) In virtualized or containerized environments, ensure that emulated zoned devices (e.g., via tcmu-runner) are either updated or disabled if not critical. 6) Educate system administrators on the specific conditions that trigger this vulnerability to avoid workloads that stress the filesystem in vulnerable configurations. 7) Consider isolating critical Btrfs storage nodes from untrusted workloads to reduce exposure. These steps go beyond generic advice by focusing on the specific interaction between Btrfs, zoned devices, and workload patterns that trigger the vulnerability.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Poland, Italy, Spain
CVE-2024-44972: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: btrfs: do not clear page dirty inside extent_write_locked_range() [BUG] For subpage + zoned case, the following workload can lead to rsv data leak at unmount time: # mkfs.btrfs -f -s 4k $dev # mount $dev $mnt # fsstress -w -n 8 -d $mnt -s 1709539240 0/0: fiemap - no filename 0/1: copyrange read - no filename 0/2: write - no filename 0/3: rename - no source filename 0/4: creat f0 x:0 0 0 0/4: creat add id=0,parent=-1 0/5: writev f0[259 1 0 0 0 0] [778052,113,965] 0 0/6: ioctl(FIEMAP) f0[259 1 0 0 224 887097] [1294220,2291618343991484791,0x10000] -1 0/7: dwrite - xfsctl(XFS_IOC_DIOINFO) f0[259 1 0 0 224 887097] return 25, fallback to stat() 0/7: dwrite f0[259 1 0 0 224 887097] [696320,102400] 0 # umount $mnt The dmesg includes the following rsv leak detection warning (all call trace skipped): ------------[ cut here ]------------ WARNING: CPU: 2 PID: 4528 at fs/btrfs/inode.c:8653 btrfs_destroy_inode+0x1e0/0x200 [btrfs] ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 2 PID: 4528 at fs/btrfs/inode.c:8654 btrfs_destroy_inode+0x1a8/0x200 [btrfs] ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ WARNING: CPU: 2 PID: 4528 at fs/btrfs/inode.c:8660 btrfs_destroy_inode+0x1a0/0x200 [btrfs] ---[ end trace 0000000000000000 ]--- BTRFS info (device sda): last unmount of filesystem 1b4abba9-de34-4f07-9e7f-157cf12a18d6 ------------[ cut here ]------------ WARNING: CPU: 3 PID: 4528 at fs/btrfs/block-group.c:4434 btrfs_free_block_groups+0x338/0x500 [btrfs] ---[ end trace 0000000000000000 ]--- BTRFS info (device sda): space_info DATA has 268218368 free, is not full BTRFS info (device sda): space_info total=268435456, used=204800, pinned=0, reserved=0, may_use=12288, readonly=0 zone_unusable=0 BTRFS info (device sda): global_block_rsv: size 0 reserved 0 BTRFS info (device sda): trans_block_rsv: size 0 reserved 0 BTRFS info (device sda): chunk_block_rsv: size 0 reserved 0 BTRFS info (device sda): delayed_block_rsv: size 0 reserved 0 BTRFS info (device sda): delayed_refs_rsv: size 0 reserved 0 ------------[ cut here ]------------ WARNING: CPU: 3 PID: 4528 at fs/btrfs/block-group.c:4434 btrfs_free_block_groups+0x338/0x500 [btrfs] ---[ end trace 0000000000000000 ]--- BTRFS info (device sda): space_info METADATA has 267796480 free, is not full BTRFS info (device sda): space_info total=268435456, used=131072, pinned=0, reserved=0, may_use=262144, readonly=0 zone_unusable=245760 BTRFS info (device sda): global_block_rsv: size 0 reserved 0 BTRFS info (device sda): trans_block_rsv: size 0 reserved 0 BTRFS info (device sda): chunk_block_rsv: size 0 reserved 0 BTRFS info (device sda): delayed_block_rsv: size 0 reserved 0 BTRFS info (device sda): delayed_refs_rsv: size 0 reserved 0 Above $dev is a tcmu-runner emulated zoned HDD, which has a max zone append size of 64K, and the system has 64K page size. [CAUSE] I have added several trace_printk() to show the events (header skipped): > btrfs_dirty_pages: r/i=5/259 dirty start=774144 len=114688 > btrfs_dirty_pages: r/i=5/259 dirty part of page=720896 off_in_page=53248 len_in_page=12288 > btrfs_dirty_pages: r/i=5/259 dirty part of page=786432 off_in_page=0 len_in_page=65536 > btrfs_dirty_pages: r/i=5/259 dirty part of page=851968 off_in_page=0 len_in_page=36864 The above lines show our buffered write has dirtied 3 pages of inode 259 of root 5: 704K 768K 832K 896K I |////I/////////////////I///////////| I 756K 868K |///| is the dirtied range using subpage bitmaps. and 'I' is the page boundary. Meanwhile all three pages (704K, 768K, 832K) have their PageDirty flag set. > btrfs_direct_write: r/i=5/259 start dio filepos=696320 len=102400 Then direct IO writ ---truncated---
AI-Powered Analysis
Technical Analysis
CVE-2024-44972 is a vulnerability identified in the Linux kernel's Btrfs filesystem implementation, specifically related to the handling of dirty pages within the extent_write_locked_range() function. The issue arises in scenarios involving subpage and zoned block devices, such as zoned HDDs emulated by tcmu-runner, where the maximum zone append size and system page size are both 64KB. Under certain workloads involving concurrent filesystem stress operations (e.g., fsstress with multiple threads performing writes, renames, and ioctl calls), the kernel fails to properly clear the dirty page flags during writeback operations. This leads to a reserved (rsv) data leak at unmount time, as indicated by kernel warnings and tracebacks in dmesg logs. The problem manifests as multiple warnings in the btrfs_destroy_inode() and btrfs_free_block_groups() functions, showing that block reservations are not correctly released, potentially causing resource leakage and filesystem inconsistencies. The root cause is linked to the improper handling of dirty page flags in subpage bitmaps during buffered and direct IO writes, which can cause the filesystem to retain stale or reserved data references after unmounting. While the vulnerability does not appear to allow direct code execution or privilege escalation, it compromises filesystem integrity and could lead to data leakage or corruption, especially on systems using Btrfs with zoned block devices. The vulnerability was disclosed and patched in September 2024, with no known exploits in the wild at the time of publication.
Potential Impact
For European organizations, the impact of CVE-2024-44972 primarily concerns data integrity and availability on systems using the Btrfs filesystem with zoned block devices or emulated zoned devices. Enterprises relying on Linux servers for critical storage, especially those using Btrfs for its advanced features like snapshots and checksumming, may experience filesystem inconsistencies or data leakage during unmount operations. This can lead to data corruption, loss of critical information, or degraded system reliability. Organizations in sectors such as finance, healthcare, and government that require high data integrity and availability could face operational disruptions. Additionally, the leakage of reserved data might expose sensitive information if attackers gain access to the affected storage devices. Although exploitation requires specific conditions (use of Btrfs on zoned devices and particular workloads), the widespread adoption of Linux and Btrfs in European data centers and cloud environments means the risk is non-negligible. The vulnerability does not require user interaction or elevated privileges to manifest, increasing the risk in multi-tenant or shared environments.
Mitigation Recommendations
To mitigate CVE-2024-44972, European organizations should: 1) Apply the latest Linux kernel patches that address this vulnerability as soon as they become available, ensuring that the Btrfs subsystem is updated to the fixed version. 2) Avoid using zoned block devices with Btrfs filesystems until patches are applied, or consider alternative filesystems that do not exhibit this issue for zoned storage. 3) Implement rigorous monitoring of kernel logs (dmesg) for warnings related to btrfs_destroy_inode and btrfs_free_block_groups to detect potential rsv leaks early. 4) Conduct regular filesystem integrity checks and backups to minimize data loss risks. 5) In virtualized or containerized environments, ensure that emulated zoned devices (e.g., via tcmu-runner) are either updated or disabled if not critical. 6) Educate system administrators on the specific conditions that trigger this vulnerability to avoid workloads that stress the filesystem in vulnerable configurations. 7) Consider isolating critical Btrfs storage nodes from untrusted workloads to reduce exposure. These steps go beyond generic advice by focusing on the specific interaction between Btrfs, zoned devices, and workload patterns that trigger the vulnerability.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-08-21T05:34:56.669Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9826c4522896dcbe0d81
Added to database: 5/21/2025, 9:08:54 AM
Last enriched: 6/28/2025, 11:11:43 PM
Last updated: 8/12/2025, 12:13:35 PM
Views: 13
Related Threats
CVE-2025-9089: Stack-based Buffer Overflow in Tenda AC20
HighCVE-2025-9088: Stack-based Buffer Overflow in Tenda AC20
HighCVE-2025-9087: Stack-based Buffer Overflow in Tenda AC20
HighTop Israeli Cybersecurity Director Arrested in US Child Exploitation Sting
HighCVE-2025-8878: CWE-94 Improper Control of Generation of Code ('Code Injection') in properfraction Paid Membership Plugin, Ecommerce, User Registration Form, Login Form, User Profile & Restrict Content – ProfilePress
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.