CVE-2025-38365
BaseFortify
Publication date: 2025-07-25
Last updated on: 2025-12-16
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | From 5.18 (inc) to 6.1.143 (exc) |
| linux | linux_kernel | From 6.2 (inc) to 6.6.96 (exc) |
| linux | linux_kernel | From 6.7 (inc) to 6.12.36 (exc) |
| linux | linux_kernel | From 6.13 (inc) to 6.15.5 (exc) |
| linux | linux_kernel | 6.16 |
| linux | linux_kernel | 6.16 |
| linux | linux_kernel | 6.16 |
| debian | debian_linux | 11.0 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-362 | The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently. |
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 rename operations and directory inode logging. When a file is being renamed and a crash or power failure occurs before the rename completes, the filesystem's log replay code may mistakenly delete the file during the next mount. This happens because the logging process captures an incomplete state where the old name has been removed but the new name has not yet been added, causing the file to be lost.
How can this vulnerability impact me? :
This vulnerability can lead to unexpected file loss. If a rename operation is interrupted by a crash or power failure, the file being renamed may be deleted when the filesystem is mounted again, resulting in data loss.
What immediate steps should I take to mitigate this vulnerability?
The vulnerability is fixed by updating the Linux kernel to a version where the race condition between renames and directory logging in btrfs is resolved. Specifically, the fix involves pinning the log root during renames before removing the old directory entry and unpinning after the rename completes. Therefore, immediate mitigation is to apply the kernel update that includes this fix to prevent potential file loss due to this race condition.