CVE-2026-31457 (GCVE-0-2026-31457)
Vulnerability from cvelistv5 – Published: 2026-04-22 13:53 – Updated: 2026-04-22 13:53
VLAI?
Title
mm/damon/sysfs: check contexts->nr in repeat_call_fn
Summary
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
Severity ?
No CVSS data available.
Assigner
References
Impacted products
| Vendor | Product | Version | ||
|---|---|---|---|---|
| Linux | Linux |
Affected:
d809a7c64ba8229286b333c0cba03b1cdfb50238 , < 3527e9fdc38570cea0f6ddb7a2c9303d4044b217
(git)
Affected: d809a7c64ba8229286b333c0cba03b1cdfb50238 , < 652cd0641a763dd0e846b0d12814977fadb2b7d8 (git) Affected: d809a7c64ba8229286b333c0cba03b1cdfb50238 , < 6557004a8b59c7701e695f02be03c7e20ed1cc15 (git) |
||
{
"containers": {
"cna": {
"affected": [
{
"defaultStatus": "unaffected",
"product": "Linux",
"programFiles": [
"mm/damon/sysfs.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"lessThan": "3527e9fdc38570cea0f6ddb7a2c9303d4044b217",
"status": "affected",
"version": "d809a7c64ba8229286b333c0cba03b1cdfb50238",
"versionType": "git"
},
{
"lessThan": "652cd0641a763dd0e846b0d12814977fadb2b7d8",
"status": "affected",
"version": "d809a7c64ba8229286b333c0cba03b1cdfb50238",
"versionType": "git"
},
{
"lessThan": "6557004a8b59c7701e695f02be03c7e20ed1cc15",
"status": "affected",
"version": "d809a7c64ba8229286b333c0cba03b1cdfb50238",
"versionType": "git"
}
]
},
{
"defaultStatus": "affected",
"product": "Linux",
"programFiles": [
"mm/damon/sysfs.c"
],
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"vendor": "Linux",
"versions": [
{
"status": "affected",
"version": "6.17"
},
{
"lessThan": "6.17",
"status": "unaffected",
"version": "0",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.18.*",
"status": "unaffected",
"version": "6.18.21",
"versionType": "semver"
},
{
"lessThanOrEqual": "6.19.*",
"status": "unaffected",
"version": "6.19.11",
"versionType": "semver"
},
{
"lessThanOrEqual": "*",
"status": "unaffected",
"version": "7.0",
"versionType": "original_commit_for_fix"
}
]
}
],
"cpeApplicability": [
{
"nodes": [
{
"cpeMatch": [
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.18.21",
"versionStartIncluding": "6.17",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "6.19.11",
"versionStartIncluding": "6.17",
"vulnerable": true
},
{
"criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
"versionEndExcluding": "7.0",
"versionStartIncluding": "6.17",
"vulnerable": true
}
],
"negate": false,
"operator": "OR"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/damon/sysfs: check contexts-\u003enr in repeat_call_fn\n\ndamon_sysfs_repeat_call_fn() calls damon_sysfs_upd_tuned_intervals(),\ndamon_sysfs_upd_schemes_stats(), and\ndamon_sysfs_upd_schemes_effective_quotas() without checking contexts-\u003enr. \nIf nr_contexts is set to 0 via sysfs while DAMON is running, these\nfunctions dereference contexts_arr[0] and cause a NULL pointer\ndereference. Add the missing check.\n\nFor example, the issue can be reproduced using DAMON sysfs interface and\nDAMON user-space tool (damo) [1] like below.\n\n $ sudo damo start --refresh_interval 1s\n $ echo 0 | sudo tee \\\n /sys/kernel/mm/damon/admin/kdamonds/0/contexts/nr_contexts"
}
],
"providerMetadata": {
"dateUpdated": "2026-04-22T13:53:50.220Z",
"orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"shortName": "Linux"
},
"references": [
{
"url": "https://git.kernel.org/stable/c/3527e9fdc38570cea0f6ddb7a2c9303d4044b217"
},
{
"url": "https://git.kernel.org/stable/c/652cd0641a763dd0e846b0d12814977fadb2b7d8"
},
{
"url": "https://git.kernel.org/stable/c/6557004a8b59c7701e695f02be03c7e20ed1cc15"
}
],
"title": "mm/damon/sysfs: check contexts-\u003enr in repeat_call_fn",
"x_generator": {
"engine": "bippy-1.2.0"
}
}
},
"cveMetadata": {
"assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
"assignerShortName": "Linux",
"cveId": "CVE-2026-31457",
"datePublished": "2026-04-22T13:53:50.220Z",
"dateReserved": "2026-03-09T15:48:24.092Z",
"dateUpdated": "2026-04-22T13:53:50.220Z",
"state": "PUBLISHED"
},
"dataType": "CVE_RECORD",
"dataVersion": "5.2",
"vulnerability-lookup:meta": {
"epss": {
"cve": "CVE-2026-31457",
"date": "2026-04-24",
"epss": "0.00017",
"percentile": "0.04052"
},
"nvd": "{\"cve\":{\"id\":\"CVE-2026-31457\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-04-22T14:16:41.133\",\"lastModified\":\"2026-04-23T16:17:41.280\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nmm/damon/sysfs: check contexts-\u003enr in repeat_call_fn\\n\\ndamon_sysfs_repeat_call_fn() calls damon_sysfs_upd_tuned_intervals(),\\ndamon_sysfs_upd_schemes_stats(), and\\ndamon_sysfs_upd_schemes_effective_quotas() without checking contexts-\u003enr. \\nIf nr_contexts is set to 0 via sysfs while DAMON is running, these\\nfunctions dereference contexts_arr[0] and cause a NULL pointer\\ndereference. Add the missing check.\\n\\nFor example, the issue can be reproduced using DAMON sysfs interface and\\nDAMON user-space tool (damo) [1] like below.\\n\\n $ sudo damo start --refresh_interval 1s\\n $ echo 0 | sudo tee \\\\\\n /sys/kernel/mm/damon/admin/kdamonds/0/contexts/nr_contexts\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/3527e9fdc38570cea0f6ddb7a2c9303d4044b217\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/652cd0641a763dd0e846b0d12814977fadb2b7d8\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/6557004a8b59c7701e695f02be03c7e20ed1cc15\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
}
}
Loading…
Loading…
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…