CVE-2023-54002
Assertion Failure in Linux Btrfs Balance Causes Denial of Service
Publication date: 2025-12-24
Last updated on: 2025-12-24
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | * |
| linux | kernel | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is related to the Btrfs filesystem in the Linux kernel. It involves an assertion failure when starting a balance operation concurrently with adding devices to the same mount point. The issue arises because the code did not properly account for certain states (like paused balance) when multiple threads race to start balance and device add operations. This can lead to assertion failures and errors when adding devices, causing the filesystem operations to fail under concurrent conditions.
How can this vulnerability impact me? :
The vulnerability can cause failures when adding devices to a Btrfs filesystem under concurrent operations, leading to assertion failures and errors (e.g., errno 14). This may result in instability or inability to properly manage devices in the filesystem, potentially disrupting system operations that rely on Btrfs device management.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring kernel logs for assertion failures related to btrfs exclusive_operation states. Look for messages indicating assertion failures in fs/btrfs/ioctl.c around lines 456-458, or errors such as 'Failed to add device /dev/vda, errno 14' along with logs showing fs_info exclusive_operation states (e.g., 0 or 3). Commands to check kernel logs include: 'dmesg | grep btrfs' or 'journalctl -k | grep btrfs'.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation steps include avoiding concurrent operations that add multiple devices or start balance operations on the same btrfs mount point simultaneously, as the issue arises from racing threads performing these actions. Applying the kernel patch that fixes the assertion in btrfs_exclop_balance is the definitive fix. Until patched, serialize btrfs device add and balance commands to prevent triggering the assertion failure.