CVE-2026-31457

mm/damon/sysfs: check contexts->nr in repeat_call_fn

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

mm/damon/sysfs: check contexts->nr in repeat_call_fn

damon_sysfs_repeat_call_fn() calls damon_sysfs_upd_tuned_intervals(),
damon_sysfs_upd_schemes_stats(), and
damon_sysfs_upd_schemes_effective_quotas() without checking contexts->nr.
If nr_contexts is set to 0 via sysfs while DAMON is running, these
functions dereference contexts_arr[0] and cause a NULL pointer
dereference. Add the missing check.

For example, the issue can be reproduced using DAMON sysfs interface and
DAMON user-space tool (damo) [1] like below.

$ sudo damo start --refresh_interval 1s
$ echo 0 | sudo tee \
/sys/kernel/mm/damon/admin/kdamonds/0/contexts/nr_contexts

Analysis

AI-generated

Technical impact

The vulnerability is a NULL pointer dereference in the Linux kernel Damon subsystem. When the number of contexts is set to zero through the sysfs interface while Damon is active, internal functions dereference a null pointer and crash the kernel. This results in a system halt rather than arbitrary code execution.

Affected Systems

The flaw exists in any Linux kernel that includes the Damon daemon monitoring functionality. It affects installations where the sysfs settings for Damon's context count are accessible and can be modified while the daemon is running. No specific affected version information is listed; the vulnerability applies to any kernel build that includes the Damon subsystem.

Risk and Exploitability

The CVSS score of 5.5 indicates moderate severity, and the EPSS score of less than 1% suggests a low probability of exploitation. The flaw is catalogued outside the CISA KEV list, implying no documented public exploits. The vulnerability is triggered by writing the value 0 to the /sys/kernel/mm/damon/.../nr_contexts sysfs attribute while the Damon daemon is active; an attacker with root or equivalent local privileges can perform this manipulation, for example using the damo tool or direct sysfs writes. When nr_contexts is set to zero, internal functions dereference a null pointer, causing the kernel to crash and resulting in a denial‑of‑service condition for the affected system.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply an updated kernel that includes the null‑pointer check in damon_sysfs_repeat_call_fn.
  • Disable or stop the Damon daemon before modifying its sysfs context settings.
  • Restrict write access to /sys/kernel/mm/damon/* to trusted administrators only.

Generated by OpenCVE AI on May 5, 2026 at 22:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs 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:*:*:*:*:*:*
Metrics cvssV3_1

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

Type Values Removed Values Added
Weaknesses CWE-690
Type Values Removed Values Added
Weaknesses CWE-690
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: mm/damon/sysfs: check contexts->nr in repeat_call_fn damon_sysfs_repeat_call_fn() calls damon_sysfs_upd_tuned_intervals(), damon_sysfs_upd_schemes_stats(), and damon_sysfs_upd_schemes_effective_quotas() without checking contexts->nr. If nr_contexts is set to 0 via sysfs while DAMON is running, these functions dereference contexts_arr[0] and cause a NULL pointer dereference. Add the missing check. For example, the issue can be reproduced using DAMON sysfs interface and DAMON user-space tool (damo) [1] like below. $ sudo damo start --refresh_interval 1s $ echo 0 | sudo tee \ /sys/kernel/mm/damon/admin/kdamonds/0/contexts/nr_contexts
Title mm/damon/sysfs: check contexts->nr in repeat_call_fn
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

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