CVE-2026-43388: Dangling Pointer in Linux Kernel DAMON Subsystem
CVE Publication: https://www.cve.org/CVERecord?id=CVE-2026-43388
Summary
A dangling pointer vulnerability was identified in the Linux kernel's DAMON (Data Access MONitor) subsystem, specifically in the damos_walk() function within mm/damon/core.c. The issue occurs when the function is called while the DAMON context is inactive. In this situation, the function returns an error without clearing the previously assigned walk_control pointer, leaving it referencing a stack-allocated structure that becomes invalid when the caller returns.
Details
Affected File: mm/damon/core.c
Vulnerable Function: damos_walk()
Affected Component: DAMON (Data Access MONitor)
Technical Analysis
Vulnerable Code:
The original implementation performed the following check without cleaning up the previously assigned pointer:
|
|
Patch Analysis:
The fix ensures that ctx->walk_control is cleared under walk_control_lock before returning -EINVAL.The following changes were introduced:
|
|
This prevents the context from retaining a pointer to an invalid control structure and follows the same cleanup approach previously implemented for a similar issue in damon_call().
Impact
- Dangling pointer: Retention of a pointer to a stack-allocated structure after its lifetime ends.
- Use-After-Free: A theoretically possible invalid memory access if the stale pointer is dereferenced.
- Denial of Service: Subsequent damos_walk() calls may fail with -EBUSY while the context remains inactive.
- Operational disruption: Confusing error conditions for users interacting with DAMON.
- This issue affects all users and environments, as it does not require authentication and is reachable via a public endpoint.
References
https://git.kernel.org/stable/c/ce0aa47c963b8c3e5beace89e2b5a665a64b5b6b
https://lists.openwall.net/linux-cve-announce/2026/05/08/97
Finder
By: CVE-Hunters
