CVE-2025-38258 mm/damon/sysfs-schemes: free old damon_sysfs_scheme_filter->memcg_path on write
A memory leak in the Linux kernel DAMON sysfs interface allows local attackers to exhaust kernel memory, causing denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-38258?
CVE-2025-38258 is a medium-severity denial of service vulnerability in Linux kernel, published on 9 Jul 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Weakness: CWE-401
Which versions are affected by CVE-2025-38258?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2025-38258?
Apply the vendor's patch.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2025-38258 being exploited?
There is no known exploitation of CVE-2025-38258 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as AZL-64844, BELL-CVE-2025-38258, DEBIAN-CVE-2025-38258, GHSA-h675-fr46-xmw3, ROOT-OS-UBUNTU-2404-CVE-2025-38258, UBUNTU-CVE-2025-38258.