CVE-2026-23142 in Linux
Summary
by MITRE • 02/14/2026
In the Linux kernel, the following vulnerability has been resolved:
mm/damon/sysfs-scheme: cleanup access_pattern subdirs on scheme dir setup failure
When a DAMOS-scheme DAMON sysfs directory setup fails after setup of access_pattern/ directory, subdirectories of access_pattern/ directory are not cleaned up. As a result, DAMON sysfs interface is nearly broken until the system reboots, and the memory for the unremoved directory is leaked.
Cleanup the directories under such failures.
If you want to get best quality of vulnerability data, you may have to visit VulDB.
Analysis
by VulDB Data Team • 03/18/2026
The vulnerability identified as CVE-2026-23142 resides within the Linux kernel's DAMON (Dynamic AMD Memory Observer) subsystem, specifically affecting the sysfs interface management during scheme directory setup operations. This issue demonstrates a critical resource management flaw that impacts the kernel's ability to properly handle memory allocation and cleanup processes. The DAMON subsystem serves as a memory monitoring framework designed to observe and analyze memory access patterns, making it an essential component for memory optimization and performance monitoring in Linux systems. When the system attempts to establish a new DAMOS-scheme configuration through the sysfs interface, it creates multiple directory structures to represent different aspects of the memory monitoring policy. The vulnerability manifests when the setup process encounters an error after successfully creating the access_pattern/ subdirectory but fails to complete the remainder of the setup sequence.
The technical flaw stems from inadequate error handling and resource cleanup mechanisms within the DAMON subsystem's sysfs directory creation logic. During normal operation, the system creates a hierarchical directory structure in sysfs to expose DAMON monitoring parameters and policies to user-space applications. When an error occurs during the scheme directory setup process, particularly after the access_pattern/ subdirectory has been successfully established, the kernel fails to properly remove the partially created directory structure. This incomplete cleanup leaves behind orphaned directory entries that persist in the sysfs filesystem, creating a state where the DAMON interface becomes effectively unusable for subsequent operations. The root cause aligns with CWE-459, which describes incomplete cleanup issues where system resources are not properly released, and represents a classic case of resource leakage in kernel space operations.
The operational impact of this vulnerability extends beyond simple resource waste to potentially render the DAMON subsystem completely non-functional until system reboot. This failure mode significantly affects system administrators and developers who rely on DAMON for memory monitoring, profiling, and optimization activities. The memory leak associated with the unremoved directory structures compounds the issue by consuming additional kernel memory resources that could otherwise be utilized for legitimate system operations. The persistence of these orphaned directories means that any subsequent attempts to create new DAMON schemes or modify existing ones will encounter errors and fail to complete properly. This vulnerability particularly affects systems that frequently configure or reconfigure memory monitoring policies, as the accumulation of failed setup attempts can lead to complete interface degradation and potential system instability.
Mitigation strategies for this vulnerability should focus on implementing comprehensive error handling and cleanup procedures within the DAMON subsystem's sysfs interface management code. The recommended approach involves ensuring that all directory creation operations are wrapped in proper error handling blocks that guarantee cleanup of partially created directory structures when failures occur. This aligns with ATT&CK technique T1547.006, which addresses privilege escalation through kernel-level modifications, as proper resource management prevents potential exploitation of resource leakage vulnerabilities. System administrators should monitor for unusual memory consumption patterns that might indicate the accumulation of leaked directory structures, while kernel developers must ensure that all sysfs directory creation sequences include rollback mechanisms for partial failures. The fix requires modifications to the kernel's sysfs directory management code to ensure that when setup operations fail after partial directory creation, all intermediate directories are properly removed to maintain system stability and interface functionality. This vulnerability underscores the critical importance of proper resource management in kernel space operations and highlights the need for robust error handling in complex subsystems that manage multiple levels of hierarchical structures.