CVE-2023-54023
Race Condition in Linux btrfs Balance Causes Kernel Panic
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 | * |
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 a race condition in the Linux kernel's btrfs filesystem between the balance operation and cancel or pause requests. When a balance operation finishes, the error handling does not properly clean up if a pause or cancel request is pending but the balance returns success (0). This improper cleanup leads to an assertion failure and kernel panic when the next balance operation starts. The fix ensures proper cleanup unless the operation was cancelled with the appropriate pause flag set.
How can this vulnerability impact me? :
This vulnerability can cause the Linux kernel to panic and crash due to an assertion failure in the btrfs filesystem when balance and cancel or pause operations run in parallel. This can lead to system instability, potential data loss, or downtime on systems using btrfs.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by monitoring for kernel panics or assertion failures related to btrfs balance operations. Specifically, look for kernel messages containing 'assertion failed: fs_info->exclusive_operation == BTRFS_EXCLOP_BALANCE_PAUSED' or kernel BUGs in fs/btrfs/messages.c. You can check the kernel logs using commands like 'dmesg | grep btrfs' or 'journalctl -k | grep btrfs' to find such errors.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation involves avoiding running btrfs balance operations in parallel with cancel or pause commands, as the race condition occurs when these operations overlap. Applying the patch that fixes the error handling in the balance operation is the definitive fix. Until then, refrain from initiating balance and cancel/pause operations simultaneously to prevent triggering the kernel panic.