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

Medium 5.5 Published Updated

A missing check in the Linux kernel DAMON sysfs interface allows a local attacker to trigger a NULL pointer dereference and cause a denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2026-31457?

CVE-2026-31457 is a medium-severity vulnerability in Linux kernel, published on 22 Apr 2026. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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

Weakness: CWE-476

Which versions are affected by CVE-2026-31457?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2026-31457?

Apply the vendor's patch.

Is CVE-2026-31457 being exploited?

There is no known exploitation of CVE-2026-31457 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2026-31457, DEBIAN-CVE-2026-31457, GHSA-p6jg-gm5j-8f2r, UBUNTU-CVE-2026-31457.

Is CVE-2026-31457 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free