CVE-2025-40205 is a Linux kernel memory-corruption vulnerability in the Btrfs filesystem export code, specifically in btrfs_encode_fh() in fs/btrfs/export.c. The flaw arises from incorrect file-handle size accounting across the three cases handled by the function. Before writing to the file handle buffer, the function reported only the sizes corresponding to non-connectable or connectable handles, but in the case where a parent exists and the parent root ID differs from the inode root ID, it writes the larger connectable-root form. If *max_len is smaller than the actual size needed for that case, the function performs an 8-byte out-of-bounds write when storing the parent root object ID. The issue is described as not easily triggerable, but it constitutes a longstanding potential kernel memory corruption bug.
Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.
What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
If you can’t patch tonight, do this now.
Patch, then assume compromise.
No public exploits tracked yet. Mallory keeps watching.
No public exploit code observed for this vulnerability.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.
19 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.
A Linux kernel Btrfs vulnerability in btrfs_encode_fh() that can cause an out-of-bounds write due to incorrect file handle size accounting, leading to potential memory corruption.
A Linux kernel Btrfs vulnerability in btrfs_encode_fh() that can cause an 8-byte out-of-bounds write due to incorrect size handling across file handle encoding cases, leading to potential memory corruption.
A potential out-of-bounds write in the Linux kernel Btrfs filesystem's btrfs_encode_fh() implementation, where the first size calculation can return a smaller handle length than the second call writes when parent and inode root IDs differ, causing an 8-byte kernel out-of-bounds write.
A potential out-of-bounds write in the Linux kernel Btrfs file system's btrfs_encode_fh() file handle implementation, where insufficiently sized allocation can be followed by a larger write when parent and inode root IDs differ.
Query your assets running an affected version, and investigate the blast radius.
Every observed campaign linking this CVE to a named adversary.
Malware families riding this exploit, with evidence and IOCs.
YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Cross-references every affected SKU, including bundled OEM variants.
Community discussion across Reddit, Mastodon, and other social sources.