mm/huge_memory: drop beyond-EOF folios with the right number of refs
In the Linux kernel, the following vulnerability has been resolved: mm/huge_memory: drop beyond-EOF folios with the right number of refs When an after-split folio is large and needs to be dropped due to EOF, folio_put_refs(folio, folio_nr_pages(folio)) should be used to drop all page cache refs. Otherwise, the folio will not be freed, causing memory leak. This leak would happen on a filesystem with blocksize > page_size and a truncate is performed, where the blocksize makes folios split to >0 order ones, causing truncated folios not being freed.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.12.21, 6.13.9
- CVEs
- CVE-2025-22000
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 2 Nov 2026, 18:28 UTC · Revision 1
Source evidence
mm/huge_memory: drop beyond-EOF folios with the right number of refs
core-osv · Original sourcePublished 3 Apr 2025, 07:19 UTC
In the Linux kernel, the following vulnerability has been resolved: mm/huge_memory: drop beyond-EOF folios with the right number of refs When an after-split folio is large and needs to be dropped due to EOF, folio_put_refs(folio, folio_nr_pages(folio)) should be used to drop all page cache refs. Otherwise, the folio will not be freed, causing memory leak. This leak would happen on a filesystem with blocksize > page_size and a truncate is performed, where the blocksize makes folios split to >0 order ones, causing truncated folios not being freed.
osv:CVE-2025-22000
Kernel
Fixed versions: 6.12.21, 6.13.9
Complete source record
{
"id": "35d7f5caae8a14e2214b2e9c53f7ff0530660c0c9755e5e5f04affaebc61bff8",
"url": "https://osv.dev/vulnerability/CVE-2025-22000",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "mm/huge_memory: drop beyond-EOF folios with the right number of refs",
"summary": "In the Linux kernel, the following vulnerability has been resolved: mm/huge_memory: drop beyond-EOF folios with the right number of refs When an after-split folio is large and needs to be dropped due to EOF, folio_put_refs(folio, folio_nr_pages(folio)) should be used to drop all page cache refs. Otherwise, the folio will not be freed, causing memory leak. This leak would happen on a filesystem with blocksize > page_size and a truncate is performed, where the blocksize makes folios split to >0 order ones, causing truncated folios not being freed.",
"evidence": "osv:CVE-2025-22000",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.12.21",
"evidence": "/affected/1/ranges"
},
{
"value": "6.13.9",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "CVE-2025-22000",
"aliases": [
"CVE-2025-22000"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "c010d47f107f609b9f4d6a103b6dfc53889049e9"
},
{
"fixed": "86368616a9ce51f6b41efa251b6e066893851d67"
},
{
"fixed": "92ad820a1f2d95d5a8d6c2bd3f391bbb068a5f9e"
},
{
"fixed": "14efb4793519d73fb2902bb0ece319b886e4b4b9"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-22000.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.9.0"
},
{
"fixed": "6.12.21"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.13.9"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-22000.json"
}
}
],
"modified": "2026-10-28T02:30:22.269634859Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/14efb4793519d73fb2902bb0ece319b886e4b4b9",
"https://git.kernel.org/stable/c/86368616a9ce51f6b41efa251b6e066893851d67",
"https://git.kernel.org/stable/c/92ad820a1f2d95d5a8d6c2bd3f391bbb068a5f9e",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/22xxx/CVE-2025-22000.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-22000",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/22xxx/CVE-2025-22000.json"
}
},
"related_cves": [
{
"value": "CVE-2025-22000",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 488442,
"published_at": "2025-04-03T07:19:03.652+00:00"
}