# CVE-2025-38258: mm/damon/sysfs-schemes: free old damon_sysfs_scheme_filter->memcg_path on write

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.27%, higher than 12% of CVEs (2026-11-30)
- Published: 2025-07-09T10:42:35.000Z
- Modified: 2026-11-05T21:18:23.580Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## Description

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.

(As written by CVE List.)

## Affected

- Linux Linux: from 7ee161f18b5da5170b5d6a51aace49d312099128 before 490a43d07f1663d827e802720d30cbc0494e4f81; from 7ee161f18b5da5170b5d6a51aace49d312099128 before c5d5b0047b0c0f304608f3824139f7bd34c48413; from 7ee161f18b5da5170b5d6a51aace49d312099128 before 4a158ac0538dd5695eeaa00aa0720d711f3e4ef1; from 7ee161f18b5da5170b5d6a51aace49d312099128 before 4f489fe6afb395dbc79840efa3c05440b760d883; 6.3 (not affected: before 6.3; from 6.6.96 up to 6.6.*; from 6.12.36 up to 6.12.*; from 6.15.5 up to 6.15.*; from 6.16 up to *)
- linux linux_kernel: from 6.3 before 6.6.96; from 6.7 before 6.12.36; from 6.13 before 6.15.5; 6.16

## References

- <https://git.kernel.org/stable/c/490a43d07f1663d827e802720d30cbc0494e4f81> (patch)
- <https://git.kernel.org/stable/c/c5d5b0047b0c0f304608f3824139f7bd34c48413> (patch)
- <https://git.kernel.org/stable/c/4a158ac0538dd5695eeaa00aa0720d711f3e4ef1> (patch)
- <https://git.kernel.org/stable/c/4f489fe6afb395dbc79840efa3c05440b760d883> (patch)

## Sources

- CVE List: [CVE-2025-38258](https://www.cve.org/CVERecord?id=CVE-2025-38258), CVE Terms of Use, modified 2026-11-05
- NVD: [CVE-2025-38258](https://nvd.nist.gov/vuln/detail/CVE-2025-38258), Public domain, modified 2026-11-05

---

Page: https://cve.day/CVE-2025-38258 · Whole record: https://cve.day/CVE-2025-38258.json · Rebuilt by cve.day 2026-11-25T22:59:01.015Z
