CVE-2026-31457

Source
https://cve.org/CVERecord?id=CVE-2026-31457
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31457.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-31457
Downstream
Published
2026-04-22T13:53:50.220Z
Modified
2026-07-15T01:48:55.012836253Z
Summary
mm/damon/sysfs: check contexts->nr in repeat_call_fn
Details

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

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

damonsysfsrepeatcallfn() calls damonsysfsupdtunedintervals(), damonsysfsupdschemesstats(), and damonsysfsupdschemeseffectivequotas() without checking contexts->nr. If nrcontexts 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
Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/31xxx/CVE-2026-31457.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d809a7c64ba8229286b333c0cba03b1cdfb50238
Fixed
3527e9fdc38570cea0f6ddb7a2c9303d4044b217
Fixed
652cd0641a763dd0e846b0d12814977fadb2b7d8
Fixed
6557004a8b59c7701e695f02be03c7e20ed1cc15

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31457.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.17.0
Fixed
6.18.21
Type
ECOSYSTEM
Events
Introduced
6.19.0
Fixed
6.19.11

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-31457.json"