CVE-2025-40101
btrfs: fix memory leaks when rejecting a non SINGLE data profile without an RST
Reported by linux · Published October 30, 2025
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.
EPSS 0.20% · 9.4th percentile
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| kernel6.12-libbpf-static | Amazon Linux | 1:6.12.55-74.119.amzn2023 |
| bpftool6.12 | Amazon Linux | 1:6.12.55-74.119.amzn2023 |
| kernel6.12-headers | Amazon Linux | 1:6.12.55-74.119.amzn2023 |
| kernel-livepatch-6.12.55-74.119 | Amazon Linux | 1:1.0-0.amzn2023 |
| kernel6.12-libbpf | Amazon Linux | 1:6.12.55-74.119.amzn2023 |
| kernel6.12-tools | Amazon Linux | 1:6.12.55-74.119.amzn2023 |
| kernel6.12 | Amazon Linux | 1:6.12.55-74.119.amzn2023 |
| kernel6.12-modules-extra-common | Amazon Linux | 1:6.12.55-74.119.amzn2023 |
| kernel6.12-modules-extra | Amazon Linux | 1:6.12.55-74.119.amzn2023 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174, 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174, 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174 |
| Linux | Linux | 6.8, 0, 6.12.55 |
| amazon:2023 | kernel6.12-libbpf-static | 0 |
| amazon:2023 | bpftool6.12 | 0 |
| amazon:2023 | kernel6.12-headers | 0 |
| amazon:2023 | kernel-livepatch-6.12.55-74.119 | 0 |
| amazon:2023 | kernel6.12-libbpf | 0 |
| amazon:2023 | kernel6.12-tools | 0 |
| amazon:2023 | kernel6.12 | 0 |
| amazon:2023 | kernel6.12-modules-extra-common | 0 |
| amazon:2023 | kernel6.12-modules-extra | 0 |
| Linux | Linux | 6.7.11, 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174, 5906333cc4af7b3fdb8cfff1cb3e8e579bd13174 |
| amazon:2023 | python3-perf6.12 | 0 |
| linux | linux_kernel | 6.7.11, 6.8, 6.8 |
| amazon:2023 | perf6.12 | 0 |
| amazon:2023 | kernel6.12-devel | 0 |
| amazon:2023 | kernel6.12-tools-devel | 0 |
| amazon:2023 | kernel6.12-libbpf-devel | 0 |
Timeline
- Oct 29, 2025 CVE Published
- Oct 30, 2025 EPSS Score (30 in total, the first dated here)
- Oct 30, 2025 Coalition ESS Score (3 in total, the first dated here)
- Dec 15, 2025 Security Advisory (119 in total, the first dated here)
- Mar 29, 2026 Distribution Patch (115 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-40101
vulnetix vdb fixes CVE-2025-40101
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-40101/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart