CVE-2025-68358
Race Condition in Linux btrfs Bitfield Write Causes Deadlock Risk
Publication date: 2025-12-24
Last updated on: 2026-02-26
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | From 6.13 (inc) to 6.17.13 (exc) |
| linux | linux_kernel | From 6.18 (inc) to 6.18.2 (exc) |
| linux | linux_kernel | From 6.7 (inc) to 6.12.68 (exc) |
| linux | linux_kernel | From 4.8 (inc) to 5.15.201 (exc) |
| linux | linux_kernel | From 5.16 (inc) to 6.1.164 (exc) |
| linux | linux_kernel | From 6.2 (inc) to 6.6.124 (exc) |
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 code, specifically in the function btrfs_clear_space_info_full(). It involves unsafe concurrent writes to bitfields without proper locking, which can cause corruption of adjacent bitfield values due to non-atomic read-modify-write sequences generated by compilers. This leads to a broken invariant where the 'flush' bit is incorrectly set, causing future allocations to block indefinitely because the system believes work is still queued or running when it is not.
How can this vulnerability impact me? :
The vulnerability can cause the btrfs filesystem to enter a state where certain operations block forever, specifically allocations that rely on the 'flush' bit to determine if work is queued or running. This can lead to system hangs or deadlocks during filesystem operations, potentially impacting system stability and availability.
What immediate steps should I take to mitigate this vulnerability?
The vulnerability is caused by a race condition in the Linux kernel's btrfs filesystem code where bitfield writes are done without proper locking, leading to corrupted state and potential deadlocks. To mitigate this vulnerability, update the Linux kernel to a version where this issue is fixed by changing the bitfield members to bools and ensuring all writes are properly locked. This prevents the race condition and maintains the invariant required for correct operation.