mm/damon/sysfs-schemes: free old damon_sysfs_scheme_filter->memcg_path on write
In the Linux kernel, the following vulnerability has been resolved: mm/damon/sysfs-schemes: free old damon_sysfs_scheme_filter->memcg_path on write memcg_path_store() assigns a newly allocated memory buffer to filter->memcg_path, without deallocating the previously allocated and assigned memory buffer. As a result, users can leak kernel memory by continuously writing a data to memcg_path DAMOS sysfs file. Fix the leak by deallocating the previously set memory buffer.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.12.36, 6.15.5, 6.6.96
- CVEs
- CVE-2025-38258
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 07:00 UTC · Revision 1
Source evidence
mm/damon/sysfs-schemes: free old damon_sysfs_scheme_filter->memcg_path on write
core-osv · Original sourcePublished 9 Jul 2025, 10:42 UTC
In the Linux kernel, the following vulnerability has been resolved: mm/damon/sysfs-schemes: free old damon_sysfs_scheme_filter->memcg_path on write memcg_path_store() assigns a newly allocated memory buffer to filter->memcg_path, without deallocating the previously allocated and assigned memory buffer. As a result, users can leak kernel memory by continuously writing a data to memcg_path DAMOS sysfs file. Fix the leak by deallocating the previously set memory buffer.
osv:CVE-2025-38258
Kernel
Fixed versions: 6.6.96, 6.12.36, 6.15.5
Complete source record
{
"id": "648f5dbc6648c1bf4b806a6a189ab968cfa6ee6f5d31ced34485557707172654",
"url": "https://osv.dev/vulnerability/CVE-2025-38258",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "mm/damon/sysfs-schemes: free old damon_sysfs_scheme_filter->memcg_path on write",
"summary": "In the Linux kernel, the following vulnerability has been resolved: mm/damon/sysfs-schemes: free old damon_sysfs_scheme_filter->memcg_path on write memcg_path_store() assigns a newly allocated memory buffer to filter->memcg_path, without deallocating the previously allocated and assigned memory buffer. As a result, users can leak kernel memory by continuously writing a data to memcg_path DAMOS sysfs file. Fix the leak by deallocating the previously set memory buffer.",
"evidence": "osv:CVE-2025-38258",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.6.96",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.36",
"evidence": "/affected/1/ranges"
},
{
"value": "6.15.5",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2025-38258",
"aliases": [
"CVE-2025-38258"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "7ee161f18b5da5170b5d6a51aace49d312099128"
},
{
"fixed": "490a43d07f1663d827e802720d30cbc0494e4f81"
},
{
"fixed": "c5d5b0047b0c0f304608f3824139f7bd34c48413"
},
{
"fixed": "4a158ac0538dd5695eeaa00aa0720d711f3e4ef1"
},
{
"fixed": "4f489fe6afb395dbc79840efa3c05440b760d883"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38258.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.3.0"
},
{
"fixed": "6.6.96"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.36"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.15.5"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38258.json"
}
}
],
"modified": "2026-10-28T02:30:26.609422768Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/490a43d07f1663d827e802720d30cbc0494e4f81",
"https://git.kernel.org/stable/c/4a158ac0538dd5695eeaa00aa0720d711f3e4ef1",
"https://git.kernel.org/stable/c/4f489fe6afb395dbc79840efa3c05440b760d883",
"https://git.kernel.org/stable/c/c5d5b0047b0c0f304608f3824139f7bd34c48413",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38258.json",
"https://nvd.nist.gov/vuln/detail/CVE-2025-38258",
"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/38xxx/CVE-2025-38258.json"
}
},
"related_cves": [
{
"value": "CVE-2025-38258",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 493187,
"published_at": "2025-07-09T10:42:35+00:00"
}