CVE-2026-31458
mm/damon/sysfs: check contexts->nr before accessing contexts_arr[0]
Check your servers for CVE-2026-31458
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-31458 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
mm/damon/sysfs: check contexts->nr before accessing contexts_arr[0]
Multiple sysfs command paths dereference contexts_arr[0] without first verifying that kdamond->contexts->nr == 1. A user can set nr_contexts to 0 via sysfs while DAMON is running, causing NULL pointer dereferences.
In more detail, the issue can be triggered by privileged users like below.
First, start DAMON and make contexts directory empty (kdamond->contexts->nr == 0).
# damo start # cd /sys/kernel/mm/damon/admin/kdamonds/0 # echo 0 > contexts/nr_contexts
Then, each of below commands will cause the NULL pointer dereference.
# echo update_schemes_stats > state # echo update_schemes_tried_regions > state # echo update_schemes_tried_bytes > state # echo update_schemes_effective_quotas > state # echo update_tuned_intervals > state
Guard all commands (except OFF) at the entry point of damon_sysfs_handle_cmd().
Exploitation
EPSS 0.17%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 3.48% of all scored CVEs. Scores of 30 Nov 2026.
The assessment of CISA (SSVC, 5 Nov 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 0ac32b8affb5a384253dbb8339bd2d0e91add0b7, before aba546061341b56e9ffb37e1eb661a3628b6ec12 affected from 0ac32b8affb5a384253dbb8339bd2d0e91add0b7, before 1e8da792672481d603fa7cd0d815577220a3ee27 affected from 0ac32b8affb5a384253dbb8339bd2d0e91add0b7, before 708033c231bd782858f4ddbb46ee874a5a5fbdab affected from 0ac32b8affb5a384253dbb8339bd2d0e91add0b7, before bbe03ad3fb9e714191757ca7b41582f930be7be2 affected from 0ac32b8affb5a384253dbb8339bd2d0e91add0b7, before 1bfe9fb5ed2667fb075682408b776b5273162615
Other versions: unaffected
|
| Linux |
affected 5.18 unaffected before 5.18 unaffected from 6.6.131 up to and including 6.6.* unaffected from 6.12.80 up to and including 6.12.* unaffected from 6.18.21 up to and including 6.18.* unaffected from 6.19.11 up to and including 6.19.* unaffected 7.0 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-31458 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-31458
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-31458
trivy image --scanners vuln IMAGE | grep CVE-2026-31458
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/aba546061341b56e9ffb37e1eb661a3628b6ec12 git.kernel.org
- https://git.kernel.org/stable/c/1e8da792672481d603fa7cd0d815577220a3ee27 git.kernel.org
- https://git.kernel.org/stable/c/708033c231bd782858f4ddbb46ee874a5a5fbdab git.kernel.org
- https://git.kernel.org/stable/c/bbe03ad3fb9e714191757ca7b41582f930be7be2 git.kernel.org
- https://git.kernel.org/stable/c/1bfe9fb5ed2667fb075682408b776b5273162615 git.kernel.org
Source: the record CVE-2026-31458 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse