Skip to main content

CVE-2024-36027: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2024-36027cvecve-2024-36027
Published: Thu May 30 2024 (05/30/2024, 15:10:17 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: btrfs: zoned: do not flag ZEROOUT on non-dirty extent buffer Btrfs clears the content of an extent buffer marked as EXTENT_BUFFER_ZONED_ZEROOUT before the bio submission. This mechanism is introduced to prevent a write hole of an extent buffer, which is once allocated, marked dirty, but turns out unnecessary and cleaned up within one transaction operation. Currently, btrfs_clear_buffer_dirty() marks the extent buffer as EXTENT_BUFFER_ZONED_ZEROOUT, and skips the entry function. If this call happens while the buffer is under IO (with the WRITEBACK flag set, without the DIRTY flag), we can add the ZEROOUT flag and clear the buffer's content just before a bio submission. As a result: 1) it can lead to adding faulty delayed reference item which leads to a FS corrupted (EUCLEAN) error, and 2) it writes out cleared tree node on disk The former issue is previously discussed in [1]. The corruption happens when it runs a delayed reference update. So, on-disk data is safe. [1] https://lore.kernel.org/linux-btrfs/3f4f2a0ff1a6c818050434288925bdcf3cd719e5.1709124777.git.naohiro.aota@wdc.com/ The latter one can reach on-disk data. But, as that node is already processed by btrfs_clear_buffer_dirty(), that will be invalidated in the next transaction commit anyway. So, the chance of hitting the corruption is relatively small. Anyway, we should skip flagging ZEROOUT on a non-DIRTY extent buffer, to keep the content under IO intact.

AI-Powered Analysis

AILast updated: 06/29/2025, 09:27:29 UTC

Technical Analysis

CVE-2024-36027 is a vulnerability identified in the Linux kernel's Btrfs filesystem implementation, specifically related to the handling of extent buffers in zoned block devices. The issue arises from improper flagging of the EXTENT_BUFFER_ZONED_ZEROOUT flag on extent buffers that are not marked as dirty but are under IO with the WRITEBACK flag set. Btrfs uses the ZEROOUT flag to clear the content of an extent buffer before bio submission to prevent write holes—situations where data inconsistencies occur due to partially completed write operations. However, in this vulnerability, the function btrfs_clear_buffer_dirty() incorrectly marks extent buffers as ZEROOUT even when they are not dirty but under IO, leading to two main problems: (1) the addition of faulty delayed reference items that cause filesystem corruption errors (EUCLEAN), and (2) the writing of cleared (zeroed) tree nodes to disk. While the first issue results in filesystem corruption errors during delayed reference updates, it does not compromise on-disk data integrity. The second issue can affect on-disk data by writing cleared tree nodes, but since these nodes are invalidated in the subsequent transaction commit, the risk of persistent corruption is low. The root cause is the inappropriate flagging of ZEROOUT on non-dirty extent buffers, which should be skipped to maintain data integrity during IO operations. This vulnerability affects specific Linux kernel versions identified by commit hashes and has been addressed by correcting the flagging logic to avoid ZEROOUT on non-dirty buffers. No known exploits are reported in the wild as of the publication date.

Potential Impact

For European organizations relying on Linux systems with Btrfs filesystems, this vulnerability poses a risk of filesystem corruption errors that could disrupt operations, particularly in environments using zoned block devices such as SMR (Shingled Magnetic Recording) drives. While the vulnerability does not directly lead to data loss or compromise confidentiality, the potential for filesystem errors (EUCLEAN) can cause application downtime, data unavailability, and increased maintenance overhead to recover or repair corrupted filesystems. Organizations with critical infrastructure or data centers using affected Linux kernel versions may experience service interruptions or degraded performance. The risk is heightened in systems with high IO workloads or those employing zoned storage devices, common in enterprise storage solutions. However, the low likelihood of persistent on-disk corruption reduces the severity of long-term data integrity impact. Overall, the vulnerability could affect availability and integrity aspects of affected systems, necessitating timely patching to maintain operational stability.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernel to the patched versions that address CVE-2024-36027. Specifically, kernel versions incorporating fixes to the btrfs_clear_buffer_dirty() function should be deployed. For environments where immediate patching is not feasible, administrators should monitor filesystem health closely, using tools like 'btrfs scrub' and 'btrfs check' to detect and repair inconsistencies early. It is advisable to avoid heavy IO workloads on zoned block devices running Btrfs until patches are applied. Additionally, maintaining regular backups of critical data and implementing robust filesystem monitoring can mitigate operational risks. Organizations should also review their storage hardware configurations to identify the use of zoned block devices and consider alternative filesystems or storage solutions if patching is delayed. Engaging with Linux distribution vendors for timely updates and security advisories is recommended to ensure ongoing protection.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-17T13:50:33.159Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9828c4522896dcbe24f5

Added to database: 5/21/2025, 9:08:56 AM

Last enriched: 6/29/2025, 9:27:29 AM

Last updated: 7/31/2025, 2:41:33 AM

Views: 13

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats