CVE-2025-40101

Source
https://cve.org/CVERecord?id=CVE-2025-40101
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40101.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40101
Downstream
Related
Published
2025-10-30T09:48:07.155Z
Modified
2026-03-20T12:43:10.701235Z
Summary
btrfs: fix memory leaks when rejecting a non SINGLE data profile without an RST
Details

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 btrfsloadblockgroupzone_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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40101.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
5906333cc4af7b3fdb8cfff1cb3e8e579bd13174
Fixed
187333e6d484c6630286bfdd07c79d6815a63887
Fixed
602701d00439e113331ee9c1283e95afdcb8849d
Fixed
fec9b9d3ced39f16be8d7afdf81f4dd2653da319
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last affected
6ffeca99bf6e84800133d21afd41c79d2f002db7

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40101.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.8.0
Fixed
6.12.55
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.17.5

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40101.json"