CVE-2026-31445 Overview
A vulnerability has been identified in the Linux kernel's DAMON (Data Access MONitor) subsystem within mm/damon/core. The flaw occurs when damon_call() is used for online DAMON parameters update via damon_commit_ctx(). When damon_commit_ctx() fails due to internal memory allocation errors, the damon_ctx structure can be left in a partially updated (corrupted) state. Continued use of this corrupted context can lead to unexpected behaviors, including NULL pointer dereference vulnerabilities, particularly in scenarios involving damos_commit_dests() failures.
Critical Impact
Exploitation of this vulnerability can result in NULL pointer dereference, potentially causing kernel crashes or denial of service conditions. While memory allocation failures are rare, the consequences of using a corrupted DAMON context are severe.
Affected Products
- Linux kernel (versions with DAMON subsystem prior to fix)
Discovery Timeline
- 2026-04-22 - CVE CVE-2026-31445 published to NVD
- 2026-04-23 - Last updated in NVD database
Technical Details for CVE-2026-31445
Vulnerability Analysis
The vulnerability stems from improper handling of partial context commits in the DAMON memory monitoring subsystem. When damon_commit_ctx() is invoked to update DAMON parameters online, it can fail for two primary reasons: invalid parameters or internal memory allocation failures. While API callers validate parameters before calling damon_commit_ctx(), they cannot prevent memory allocation failures.
When such an allocation failure occurs, the destination damon_ctx structure may be left in an inconsistent state—some fields updated while others remain unchanged. The function only guarantees that the corrupted damon_ctx can be safely deallocated using damon_destroy_ctx(), but it does not prevent subsequent use of the corrupted context by the DAMON kernel thread (kdamond).
This race between context corruption and continued operation creates conditions where NULL pointer dereferences can occur, particularly within damos_commit_dests() operations. While memory allocation failures are statistically rare ("arguably too small to fail"), the potential for kernel instability justifies remediation.
Root Cause
The root cause is the lack of a mechanism to flag and halt operations on a damon_ctx that has undergone a failed partial commit. Before the fix, there was no way to communicate to kdamond_fn() and other callers that a context corruption event had occurred, allowing DAMON to continue operating with corrupted data structures.
Attack Vector
This vulnerability is triggered through internal kernel operations rather than direct external attack vectors. The conditions require:
- An active DAMON monitoring context undergoing online parameter updates
- A memory allocation failure during damon_commit_ctx() execution
- Continued kernel thread operation with the corrupted context
While not directly exploitable by unprivileged users, systems under memory pressure or those with artificially constrained memory resources may encounter these conditions. The vulnerability primarily represents a reliability and stability issue that could result in kernel panics or denial of service.
The fix introduces a maybe_corrupted field in the damon_ctx structure. When damon_commit_ctx() fails, this field is set. The kdamond_call() function checks this field after each callback execution, ignoring remaining requests and returning if corruption is detected. Similarly, kdamond_fn() checks this field after kdamond_call() invocations, breaking the main loop to prevent use of the potentially corrupted context.
Detection Methods for CVE-2026-31445
Indicators of Compromise
- Unexpected kernel panics or NULL pointer dereference errors in the DAMON subsystem
- Kernel log messages indicating memory allocation failures in mm/damon/core
- System instability during DAMON parameter reconfiguration operations
- Stack traces referencing damon_commit_ctx(), kdamond_call(), or damos_commit_dests()
Detection Strategies
- Monitor kernel logs for DAMON-related errors using dmesg or centralized logging
- Implement kernel crash dump analysis to identify NULL pointer dereferences in the DAMON code path
- Deploy runtime kernel monitoring tools to detect anomalous memory subsystem behavior
- Use SentinelOne Singularity platform for real-time kernel event monitoring and anomaly detection
Monitoring Recommendations
- Enable comprehensive kernel logging with increased verbosity for memory management subsystems
- Configure crash dump collection to capture kernel state during failures
- Implement automated alerting for DAMON-related kernel warnings or errors
- Monitor system memory pressure indicators that could increase the likelihood of allocation failures
How to Mitigate CVE-2026-31445
Immediate Actions Required
- Update to a patched Linux kernel version that includes the maybe_corrupted field implementation
- Review system memory allocation policies to reduce pressure on kernel memory pools
- Monitor systems for signs of DAMON-related instability
- Consider temporarily disabling DAMON on critical systems until patches are applied
Patch Information
The Linux kernel maintainers have released patches to address this vulnerability. The fix introduces a maybe_corrupted field in the damon_ctx structure to track and prevent use of corrupted contexts. Multiple commits have been applied to the stable kernel branches:
Organizations should apply these patches through their standard kernel update processes or by updating to a kernel release that incorporates these fixes.
Workarounds
- Disable DAMON monitoring on affected systems if the feature is not critical to operations
- Ensure adequate system memory is available to minimize allocation failure scenarios
- Implement memory overcommit restrictions to reduce kernel memory pressure
- Monitor and alert on low memory conditions that could trigger the vulnerability
# Check current kernel version
uname -r
# Verify DAMON is compiled into the kernel
grep CONFIG_DAMON /boot/config-$(uname -r)
# Monitor for DAMON-related kernel messages
dmesg | grep -i damon
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

