Linux Kernel Btrfs Deadlock Vulnerability in Zone Activation

Vulnerability

A deadlock vulnerability has been identified in the Linux kernel's Btrfs file system, specifically within the zoned storage management. The issue arises in the 'btrfs_can_activate_zone' function, which can be called while holding the 'device_list_mutex'. This creates a scenario where the function attempts to acquire the same mutex again, leading to a deadlock. The problem occurs during the chunk allocation process, where the mutex is already held, causing a recursive locking situation. The vulnerability affects Linux kernel versions prior to 5.17.0.

Impact

Exploitation of this vulnerability leads to a deadlock condition, causing the system to hang indefinitely while waiting for a lock to be released.

Reproduction

The vulnerability can be reproduced by triggering the chunk allocation process in Btrfs while the 'device_list_mutex' is already held. This can be done by initiating a zone activation or similar operation that requires chunk allocation, which will then attempt to acquire the 'device_list_mutex' again, resulting in a deadlock.

Remediation

Users can upgrade to Linux kernel version 5.17.0 or later, where this vulnerability has been addressed.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
9.0
impact
2.5
exploitability
4.3
remediation
0.0
relevance
0.0
threat
4.8
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.