Skip to contentSkip to conversation

CVE-2026-74319: btrfs: zoned: fix deadlock waiting for ticket during data relocation

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Aug 15

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

btrfs: zoned: fix deadlock waiting for ticket during data relocation

When performing data relocation on a zoned filesystem, BTRFS can deadlock in handle_reserve_tickets(). The relocation process is waiting on a space reservation ticket that can never be fulfilled, because the relocation itself is the operation responsible for freeing up that space.

Fix this by introducing a new flush state, BTRFS_RESERVE_FLUSH_ZONED_RELOCATION, specifically for data chunk allocation during zoned relocation. Like BTRFS_RESERVE_FLUSH_FREE_SPACE_INODE, this state uses priority_reclaim_data_space() instead of the normal flushing path, which avoids re-entering the relocation code and breaking the deadlock cycle.

In btrfs_alloc_data_chunk_ondemand(), select this new flush state when the inode belongs to a data relocation root on a zoned filesystem.

The Linux kernel CVE team has assigned CVE-2026-74319 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 7.1 with commit e2a7fd22378f6500bcf979edc71e6837271eacfd and fixed in 7.1.5 with commit f84dbbaa988e1344634a20ddf6c7d51a99f12477
	Issue introduced in 7.1 with commit e2a7fd22378f6500bcf979edc71e6837271eacfd and fixed in 7.2-rc1 with commit 814c3b4ea357297c507158bceb07bcdc5fbe9808

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-74319

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
fs/btrfs/delalloc-space.c
fs/btrfs/space-info.c
fs/btrfs/space-info.h

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/f84dbbaa988e1344634a20ddf6c7d51a99f12477
	https://git.kernel.org/stable/c/814c3b4ea357297c507158bceb07bcdc5fbe9808