CVE-2026-89796: mm/damon/core: avoid infinite kdamond_merge_regions() internal loop

Published Sep 16, 2026
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

mm/damon/core: avoid infinite kdamondmergeregions() internal loop

Patch series "mm/damon: unurgent fixes for infinite loop, NULL de-ref and races", v1.1.

Sashiko found a few issues in DAMON that could cause infinite loop, NULL dereference and monitoring results degradation. The first two sounds scary but the infinite loop happens only under unreasonable user setup. The NULL dereference is only in a unit test. Monitoring results degradation is trivial since it is only best-effort, and those happens from only unlikely races. Still those are bugs that better to fix if possible. Fix those.

This patch (of 6):

Due to online parameter update like events, the number of DAMON regions could be higher than the user-set upper limit. kdamondmergeregions() repeats merge regions until the number meets the limit, while doubling the merge threshold up to the theoretical maximum threshold. It is tried only up to the theoretical maximum threshold because even the aggressive merging can fail from reducing the number of regions under the user-defined upper limit. For example, there could be many user-defined non-contiguous regions that cannot be merged.

The threshold based loop break condition is evaluated by comparing the threshold for the next merging try against the theoretical maximum threshold. If maxthres is larger than UINTMAX / 2, doubling the threshold could make it overflow, and bypass the loop break condition. In the case, if the number of regions cannot be reduced under the upper limit like explained above, the loop will run infinitely.

Prevent the case by doing the break condition check before doubling the threshold. Also, prevent the threshold exceeding the maximum threshold, as it could overflow and apply the wrong merge threshold.

This issue is unlikely to occur in real world, since having the maxthres higher than UINTMAX / 2 require unrealistically large aggregation intervals compared to the sampling interval. Also, it requires an unrealistically large number of uncontiguous regions setup. Nonetheless, the consequence is bad and the fix is simple.

The issue was discovered [1] by Sashiko.

Affected Software

1 affected component
Linux Kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Linux kernel to a version that resolves this vulnerability.

    Fixed in v1.1
  2. Configuration

    Apply the patch series mm/damon: unurgent fixes for infinite loop, NULL de-ref and races; specifically, in kdamond_merge_regions(), check the threshold-based loop break condition before doubling the merge threshold to avoid overflow and infinite looping.

    Linux kernel mm/damon/core (kdamond_merge_regions) threshold doubling / loop break check order = Perform the break condition check before doubling the merge threshold to prevent overflow bypassing the loop break condition
  3. Configuration

    Apply the patch series mm/damon: unurgent fixes for infinite loop, NULL de-ref and races to correct the NULL dereference issue reported by Sashiko (noting it is only present in a unit test).

    Linux kernel mm/damon NULL dereference handling = Fix NULL dereference causing infinite loop/monitoring issues (noting it is only in a unit test)
  4. Compensating control

    Since the described infinite loop/merge-threshold overflow requires unreasonable user setup (e.g., max_thres large enough to overflow, or unrealistically large aggregation intervals), constrain DAMON configuration (max_thres/aggregation interval) to safe operational ranges to avoid triggering the overflow/infinite-loop condition.

Event History

Sep 16, 2026
CVE Published
via MITRE·10:30 AM
Data Sourced
via MITRE·10:30 AM
Description

Frequently Asked Questions

1

Which deployments are most likely to encounter this issue?

The issue is described as occurring only under an unreasonable user setup. A relevant condition is having more DAMON regions than the user-configured upper limit, such as many non-contiguous user-defined regions.

2

What condition leads to the non-terminating behavior?

Online parameter updates or similar events can increase the number of DAMON regions beyond the configured upper limit. The merge logic keeps trying to reduce the region count, but aggressive merging may still be unable to reach that limit.

3

Does the related NULL dereference affect normal DAMON operation?

The provided information states that the NULL dereference occurs only in a unit test. It does not describe it as affecting normal runtime use.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203