# btrfs: avoid potential out-of-bounds in btrfs_encode_fh()

CVE record · `CVE-2025-40205`

- **Identifiers:** `CVE-2025-40205`
- **State:** Confirmed
- **Severity:** CVSS 7.8 High
- **Critical:** No
- **CNA:** Linux
- **Technologies:** [Linux kernel](https://agentprime.io/advisories/technology/linux-kernel.md)
- **Published:** 12 Nov 2025
- **Updated:** 15 Oct 2026
- **Reviewed by a person:** No

Published by the CVE Program (CNA: Linux) at 12 Nov 2025, 21:56 UTC. agentprime has not analysed this yet, so whether it affects any app is not known. This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it.

## Affected products, as the CNA wrote them

- Vendor: Linux. Product: Linux.
  - affected: `be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to before 60de2f55d2aca53e81b4ef2a67d7cc9e1eb677db` (git)
  - affected: `be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to before 742b44342204e5dfe3926433823623c1a0c581df` (git)
  - affected: `be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to before d3a9a8e1275eb9b87f006b5562a287aea3f6885f` (git)
  - affected: `be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to before d91f6626133698362bba08fbc04bd72c466806d3` (git)
  - affected: `be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to before 0276c8582488022f057b4cec21975a5edf079f47` (git)
  - affected: `be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to before 361d67276eb8ec6be8f27f4ad6c6090459438fee` (git)
  - affected: `be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to before 43143776b0a7604d873d1a6f3e552a00aa930224` (git)
  - affected: `be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to before dff4f9ff5d7f289e4545cc936362e01ed3252742` (git)
  - Other versions: unaffected
- Vendor: Linux. Product: Linux.
  - affected: `2.6.29`
  - unaffected: `before 2.6.29` (semver)
  - unaffected: `5.4.301 to 5.4.*, inclusive` (semver)
  - unaffected: `5.10.246 to 5.10.*, inclusive` (semver)
  - unaffected: `5.15.195 to 5.15.*, inclusive` (semver)
  - unaffected: `6.1.157 to 6.1.*, inclusive` (semver)
  - unaffected: `6.6.113 to 6.6.*, inclusive` (semver)
  - unaffected: `6.12.54 to 6.12.*, inclusive` (semver)
  - unaffected: `6.17.4 to 6.17.*, inclusive` (semver)
  - unaffected: `6.18 to *, inclusive` (original_commit_for_fix)
  - Other versions: affected

## Not analysed yet

We haven’t published our own analysis of this CVE. If a person reviews it, this page will say what’s affected and what has to be true for it to matter.

## Severity and exploitation

- 7.8 High, CVSS 3.1: `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`, from CNA (Linux)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0015, the 4th percentile, on 19 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

This record came from the full history of the CVE Program, published 12 Nov 2025. New records show when each source confirmed them.

## Sources

- [CVE List: CVE-2025-40205](https://www.cve.org/CVERecord?id=CVE-2025-40205)
- [NVD: CVE-2025-40205](https://nvd.nist.gov/vuln/detail/CVE-2025-40205)

### References from the CNA

- <https://git.kernel.org/stable/c/60de2f55d2aca53e81b4ef2a67d7cc9e1eb677db>
- <https://git.kernel.org/stable/c/742b44342204e5dfe3926433823623c1a0c581df>
- <https://git.kernel.org/stable/c/d3a9a8e1275eb9b87f006b5562a287aea3f6885f>
- <https://git.kernel.org/stable/c/d91f6626133698362bba08fbc04bd72c466806d3>
- <https://git.kernel.org/stable/c/0276c8582488022f057b4cec21975a5edf079f47>
- <https://git.kernel.org/stable/c/361d67276eb8ec6be8f27f4ad6c6090459438fee>
- <https://git.kernel.org/stable/c/43143776b0a7604d873d1a6f3e552a00aa930224>
- <https://git.kernel.org/stable/c/dff4f9ff5d7f289e4545cc936362e01ed3252742>

Facts on this page come from the CVE List as the CNA published them, with CVSS from the sources named above, CISA KEV and FIRST EPSS. Vendors, products and versions are shown as the CNA wrote them. We don’t reproduce the CVE’s description.

## Check whether this affects you

This CVE names a vendor and product rather than a package, so the lockfile check doesn’t match it. Compare the affected versions above with what you run.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), `get_advisory` returns this record and `search_advisories` finds related ones. Setup: <https://agentprime.io/mcp.md>
- As JSON: <https://api.agentprime.io/v1/advisories/CVE-2025-40205>
- Everything that needs attention now: <https://agentprime.io/advisories/critical.md>

---

The web page: <https://agentprime.io/advisories/CVE-2025-40205/>. Everything for agents: <https://agentprime.io/llms.txt>.
