Out-of-Bounds Write in Linux Kernel Btrfs File System
CVE-2025-40205

Currently unrated

Key Information:

Vendor

Linux

Status
Vendor
CVE Published:
12 November 2025

What is CVE-2025-40205?

A potential out-of-bounds write vulnerability exists in the btrfs_encode_fh() function of the Linux kernel. This issue arises due to improper handling of certain parameters, which could lead to memory corruption if the size of the buffer is not sufficiently allocated. Specifically, when a parent directory is involved and its root ID differs from that of the inode, the function may attempt to write more data than allocated. Although not easily triggered, this issue poses a risk that warrants attention and has been addressed in a recent patch ensuring appropriate size validation before writing.

Affected Version(s)

Linux be6e8dc0ba84029997075a1ec77b4ddb863cbe15 < 60de2f55d2aca53e81b4ef2a67d7cc9e1eb677db

Linux be6e8dc0ba84029997075a1ec77b4ddb863cbe15 < 742b44342204e5dfe3926433823623c1a0c581df

Linux be6e8dc0ba84029997075a1ec77b4ddb863cbe15

References

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.
CVE-2025-40205 : Out-of-Bounds Write in Linux Kernel Btrfs File System