CVE-2025-40205
BaseFortify
Publication date: 2025-11-12
Last updated on: 2025-11-14
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 in the Linux kernel's btrfs filesystem code, specifically in the function btrfs_encode_fh(). The function does not properly handle three different cases when encoding a file handle, leading to a situation where it can write more data than the buffer size allows. This causes an 8-byte out-of-bounds write, which is a form of memory corruption. The issue arises because the function sometimes writes 40 bytes but only indicates a smaller size (20 or 32 bytes), so if the buffer is not large enough, it overwrites memory beyond its boundary.
How can this vulnerability impact me? :
This vulnerability can lead to memory corruption in the Linux kernel when using the btrfs filesystem. Although it is not easily triggerable, memory corruption bugs can potentially cause system instability, crashes, or be exploited to execute arbitrary code with kernel privileges, which could compromise system security.
What immediate steps should I take to mitigate this vulnerability?
The vulnerability is resolved by applying the patch that ensures the function btrfs_encode_fh() returns the appropriate size for all cases and validates the buffer size before writing. Immediate mitigation steps include updating the Linux kernel to a version that contains this fix to avoid potential out-of-bounds writes and memory corruption.