# CVE-2025-40101: btrfs: fix memory leaks when rejecting a non SINGLE data profile without an RST

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.27% (percentile 13, 2026-11-26)
- **Published:** 2025-10-30T09:48:07.155Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174, \< 187333e6d484c6630286bfdd07c79d6815a63887; \>= 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174, \< 602701d00439e113331ee9c1283e95afdcb8849d; \>= 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174, \< fec9b9d3ced39f16be8d7afdf81f4dd2653da319; 6ffeca99bf6e84800133d21afd41c79d2f002db7; \>= 6.7.11, \< 6.8
- Anyone running Linux 6.8

## Description

In the Linux kernel, the following vulnerability has been resolved:

btrfs: fix memory leaks when rejecting a non SINGLE data profile without an RST

At the end of btrfs\_load\_block\_group\_zone\_info() the first thing we do
is to ensure that if the mapping type is not a SINGLE one and there is
no RAID stripe tree, then we return early with an error.

Doing that, though, prevents the code from running the last calls from
this function which are about freeing memory allocated during its
run. Hence, in this case, instead of returning early, we set the ret
value and fall through the rest of the cleanup code.

## Affected and fixed versions

- Linux: \>= 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174, \< 187333e6d484c6630286bfdd07c79d6815a63887; \>= 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174, \< 602701d00439e113331ee9c1283e95afdcb8849d; \>= 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174, \< fec9b9d3ced39f16be8d7afdf81f4dd2653da319; 6ffeca99bf6e84800133d21afd41c79d2f002db7; \>= 6.7.11, \< 6.8 (cvelist)
- Linux: 6.8 (cvelist)

## Mitigation

- Upgrade Linux to 6.8 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-40101. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-40101.md
Affected: Linux >= 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174, < 187333e6d484c6630286bfdd07c79d6815a63887; >= 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174, < 602701d00439e113331ee9c1283e95afdcb8849d; >= 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174, < fec9b9d3ced39f16be8d7afdf81f4dd2653da319; 6ffeca99bf6e84800133d21afd…
Fixed in: Linux 187333e6d484c6630286bfdd07c79d6815a63887, Linux 602701d00439e113331ee9c1283e95afdcb8849d, Linux 6.8

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-40101 being exploited?

There is no confirmed exploitation: CVE-2025-40101 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.27% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-40101?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2025-40101?

Linux \>= 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174, \< 187333e6d484c6630286bfdd07c79d6815a63887; \>= 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174, \< 602701d00439e113331ee9c1283e95afdcb8849d; \>= 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174, \< fec9b9d3ced39f16be8d7afdf81f4dd2653da319; 6ffeca99bf6e84800133d21afd41c79d2f002db7; \>= 6.7.11, \< 6.8; Linux 6.8.

### Is there a fix for CVE-2025-40101?

Yes. Fixed in Linux 187333e6d484c6630286bfdd07c79d6815a63887, Linux 602701d00439e113331ee9c1283e95afdcb8849d, Linux 6.8. Upgrade Linux to 6.8 or later.

### How do I check if I'm affected by CVE-2025-40101?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/187333e6d484c6630286bfdd07c79d6815a63887>
- other: <https://git.kernel.org/stable/c/602701d00439e113331ee9c1283e95afdcb8849d>
- other: <https://git.kernel.org/stable/c/fec9b9d3ced39f16be8d7afdf81f4dd2653da319>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-40101>

HTML: <https://flawdb.com/CVE-2025-40101> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-40101>
