CVE-2026-74572 in Linuxinfo

Summary

by MITRE • 08/15/2026

In the Linux kernel, the following vulnerability has been resolved:

btrfs: zoned: fix deadlock between metadata writeback and transaction commit

When writing out metadata extent buffers in a zoned filesystem, btree_writepages() holds fs_info->zoned_meta_io_lock across the whole writeback loop, including the call to btrfs_check_meta_write_pointer() -> check_bg_is_active().

For the tree-log block group, check_bg_is_active() may fail to activate the zone and fall back to btrfs_zone_finish_one_bg() to free an active zone. That path waits for the running transaction to commit while still holding zoned_meta_io_lock, but the committer needs that same lock to write out the tree extents, so the two tasks deadlock:

Task A (kworker, metadata writeback) Task B (fsstress, transaction commit) ------------------------------------ ------------------------------------- wb_workfn() btrfs_commit_transaction(T) btree_writepages() btrfs_write_and_wait_transaction() btrfs_zoned_meta_io_lock() btrfs_write_marked_extents() btrfs_check_meta_write_pointer() btree_writepages() check_bg_is_active() [treelog_bg] btrfs_zoned_meta_io_lock()
btrfs_zone_finish_one_bg() <blocks on zoned_meta_io_lock, btrfs_zone_finish() held by Task A> do_zone_finish() btrfs_inc_block_group_ro() btrfs_wait_for_commit() <blocks waiting for commit of transaction T, done by Task B>

The sibling branch in check_bg_is_active() already drops zoned_meta_io_lock around do_zone_finish() for this exact reason. Do the same in the tree-log branch: release the lock around btrfs_zone_finish_one_bg() and re-acquire it afterwards. The lock only protects fs_info->active_{meta,system}_bg,
which this branch does not touch, and ctx->zoned_bg keeps a reference to the block group across the unlock, so nothing is lost while the lock is dropped.

This hang occasionally reproduces with fstests generic/475 on a zoned btrfs filesystem.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 08/16/2026

This vulnerability exists within the Linux kernel's btrfs filesystem implementation, specifically affecting zoned filesystems where metadata writeback operations can lead to deadlock conditions. The issue stems from improper lock management during metadata extent buffer writing processes, creating a circular dependency that halts system operations. When the kernel attempts to write metadata extents in zoned filesystems, it acquires the fs_info->zoned_meta_io_lock and maintains this lock throughout an entire writeback loop including calls to btrfs_check_meta_write_pointer() which subsequently invokes check_bg_is_active(). This locking pattern becomes problematic when processing tree-log block groups because check_bg_is_active() may fail to activate zones and must fall back to btrfs_zone_finish_one_bg() to free active zones. The problematic path waits for the running transaction to commit while still holding the zoned_meta_io_lock, creating a deadlock scenario where metadata writeback tasks cannot proceed due to waiting on transaction commits, and transaction committers cannot progress because they require the same lock held by writeback operations.

The technical flaw manifests as a classic deadlock condition governed by CWE-362, which describes concurrent access issues where multiple threads or processes block each other indefinitely. The vulnerability operates under the ATT&CK framework category of privilege escalation through system resource exhaustion, specifically targeting kernel-level concurrency mechanisms. The lock acquisition pattern violates proper locking hierarchy principles and creates an unavoidable circular wait condition as defined by the dining philosophers problem in operating systems theory. The btrfs filesystem's zoned storage support introduces additional complexity because it must manage zone states and ensure proper block group activation while maintaining consistency across concurrent operations.

The operational impact of this vulnerability is severe as it can cause complete system hang or freeze, particularly affecting systems running zoned btrfs filesystems under heavy metadata write loads. The deadlock occurs during normal filesystem operations when the kernel attempts to commit transactions while simultaneously writing metadata extents, making it difficult to predict or prevent in production environments. Performance degradation manifests as indefinite blocking of filesystem operations, potentially leading to application timeouts and system unresponsiveness. This vulnerability specifically impacts systems using zoned storage devices such as ZNS SSDs where the btrfs filesystem must manage zone lifecycle transitions and block group activation states.

The fix implements a proper locking strategy by modifying the check_bg_is_active() function to release fs_info->zoned_meta_io_lock around the btrfs_zone_finish_one_bg() call, similar to how the sibling branch already handles this scenario. This approach ensures that locks are held for minimal durations while maintaining necessary consistency guarantees. The solution addresses the root cause by preventing the circular dependency between metadata writeback and transaction commit operations, allowing both processes to proceed independently without blocking each other. Since the lock only protects fs_info->active_{meta,system}_bg which this specific branch does not modify, and since ctx->zoned_bg maintains a reference to the block group across the unlock operation, no data integrity is compromised during the temporary release of the lock. The fix aligns with best practices for avoiding deadlock conditions in concurrent systems and specifically addresses the design flaw identified in the Linux kernel's btrfs implementation that was exposed through testing with fstests generic/475 on zoned filesystems.

Responsible

Linux

Reservation

08/15/2026

Disclosure

08/15/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Might our Artificial Intelligence support you?

Check our Alexa App!