CVE-2025-40227 mm/damon/sysfs: dealloc commit test ctx always
A memory leak in the Linux kernel DAMON subsystem allows local attackers to exhaust system 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-40227?
CVE-2025-40227 is a memory corruption vulnerability in Linux, published on 4 Dec 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: dealloc commit test ctx always
The damon_ctx for testing online DAMON parameters commit inputs is deallocated only when the test fails. This means memory is leaked for every successful online DAMON parameters commit. Fix the leak by always deallocating it.
Which versions are affected by CVE-2025-40227?
How do I fix CVE-2025-40227?
Apply the vendor's patch.
Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.
Is CVE-2025-40227 being exploited?
There is no known exploitation of CVE-2025-40227 in the wild and no public exploit code.
Sources
Also known as BELL-CVE-2025-40227, DEBIAN-CVE-2025-40227, GHSA-qwp2-9fw4-x3jx, UBUNTU-CVE-2025-40227.