CVE-2025-40303
BaseFortify
Publication date: 2025-12-08
Last updated on: 2025-12-08
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 occurs in the Linux kernel's btrfs filesystem when it encounters errors. If the filesystem is marked as having errors, no new transactions are allowed, leaving some metadata modifications dirty in the page cache without being properly written back or invalidated. When the system attempts to write back this dirty metadata, especially on RAID5 or RAID6 metadata configurations, it triggers read-modify-write operations on workqueues that have already been stopped, causing use-after-free issues and potential crashes. The fix involves marking such write attempts as failures immediately to avoid submitting them, preventing further corruption and crashes.
How can this vulnerability impact me? :
This vulnerability can cause system crashes or instability due to use-after-free errors when the btrfs filesystem is used with RAID5 or RAID6 metadata and encounters errors. It may also lead to further filesystem corruption if corrupted tree blocks are written back improperly, potentially resulting in data loss or degraded system reliability.
What immediate steps should I take to mitigate this vulnerability?
The vulnerability is fixed by adding special handling in the Linux kernel's btrfs code to avoid writing back dirty metadata when the filesystem is in an error state. To mitigate this vulnerability immediately, you should update your Linux kernel to a version that includes this fix. This prevents use-after-free conditions and further filesystem corruption by discarding dirty metadata instead of writing it back when errors occur.