CVE-2026-31652

mm/damon/stat: deallocate damon_call() failure leaking damon_ctx

Published Apr 24, 2026 CVSS 3.1 · 7.8 High EPSS < 1% KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

mm/damon/stat: deallocate damon_call() failure leaking damon_ctx

damon_stat_start() always allocates the module's damon_ctx object
(damon_stat_context). Meanwhile, if damon_call() in the function fails,
the damon_ctx object is not deallocated. Hence, if the damon_call() is
failed, and the user writes Y to “enabled” again, the previously
allocated damon_ctx object is leaked.

This cannot simply be fixed by deallocating the damon_ctx object when
damon_call() fails. That's because damon_call() failure doesn't guarantee
the kdamond main function, which accesses the damon_ctx object, is
completely finished. In other words, if damon_stat_start() deallocates
the damon_ctx object after damon_call() failure, the not-yet-terminated
kdamond could access the freed memory (use-after-free).

Fix the leak while avoiding the use-after-free by keeping returning
damon_stat_start() without deallocating the damon_ctx object after
damon_call() failure, but deallocating it when the function is invoked
again and the kdamond is completely terminated. If the kdamond is not yet
terminated, simply return -EAGAIN, as the kdamond will soon be terminated.

The issue was discovered [1] by sashiko.

Analysis

AI-generated

Technical impact

The Linux kernel contains a flaw in mm/damon/stat where the damon_ctx object allocated by damon_stat_start() is not properly freed when damon_call() fails. This oversight allows the context to leak memory after the user re‑enables the feature, and if the object were to be freed prematurely the kdamond process could later access the freed memory leading to a use‑after‑free condition. The consequence is a kernel memory leak that can culminate in kernel instability or a local denial of service if the attacker can repeatedly allocate and fail to trigger the cleaner. The weakness is classified as CWE‑416 (Use‑After‑Free) and CWE‑772 (resource leak).

Affected Systems

This issue affects the Linux kernel in releases 6.17 and all 7.0 release candidates (rc1 through rc7). It is therefore relevant to any distribution that ships one of these kernel versions or later until the vendor applies the fix.

Risk and Exploitability

The CVSS score of 7.8 reflects moderate to high severity, while the EPSS score of less than 1% indicates that exploitation is unlikely to be observed in the wild but is still possible. The vulnerability is not listed in the CISA KEV catalog, suggesting no publicly known exploits. The likely attack vector is local; an attacker with kernel‑level privileges can cause the allocation and subsequent failure to trigger the memory leak or potential use‑after‑free, leading to a denial of service or further kernel compromise if combined with other local vulnerabilities.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the kernel to a version that contains the fix for the damon_ctx deallocation issue, such as any release newer than Linux kernel 6.17 or post‑7.0 RC5. Reboot the system after applying the updated kernel to ensure the patched code is loaded. If an immediate kernel upgrade is not feasible, disable or remove the kdamond subsystem (or the feature that enables damon_stat_start) until a patch is available to prevent the allocation path from being exercised.

Generated by OpenCVE AI on April 28, 2026 at 13:47 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-416
CPEs cpe:2.3:o:linux:linux_kernel:6.17:-:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc6:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc7:*:*:*:*:*:*
Metrics cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: mm/damon/stat: deallocate damon_call() failure leaking damon_ctx damon_stat_start() always allocates the module's damon_ctx object (damon_stat_context). Meanwhile, if damon_call() in the function fails, the damon_ctx object is not deallocated. Hence, if the damon_call() is failed, and the user writes Y to “enabled” again, the previously allocated damon_ctx object is leaked. This cannot simply be fixed by deallocating the damon_ctx object when damon_call() fails. That's because damon_call() failure doesn't guarantee the kdamond main function, which accesses the damon_ctx object, is completely finished. In other words, if damon_stat_start() deallocates the damon_ctx object after damon_call() failure, the not-yet-terminated kdamond could access the freed memory (use-after-free). Fix the leak while avoiding the use-after-free by keeping returning damon_stat_start() without deallocating the damon_ctx object after damon_call() failure, but deallocating it when the function is invoked again and the kdamond is completely terminated. If the kdamond is not yet terminated, simply return -EAGAIN, as the kdamond will soon be terminated. The issue was discovered [1] by sashiko.
Title mm/damon/stat: deallocate damon_call() failure leaking damon_ctx
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-416

    Use After Free

  • CWE-772

    Missing Release of Resource after Effective Lifetime

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
May 11, 2026, 10:12 PM
Reserved
Mar 9, 2026, 3:48 PM
Status
Analyzed
Published
Apr 24, 2026, 3:16 PM
Modified
Nov 11, 2026, 11:10 PM
Severity
Public date
Apr 24, 2026, 12:00 AM