{"api_version":"1","generated_at":"2026-04-23T00:40:16+00:00","cve":"CVE-2026-31457","urls":{"html":"https://cve.report/CVE-2026-31457","api":"https://cve.report/api/cve/CVE-2026-31457.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-31457","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-31457"},"summary":{"title":"mm/damon/sysfs: check contexts->nr in repeat_call_fn","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/damon/sysfs: check contexts->nr 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->nr. \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","state":"PUBLISHED","assigner":"Linux","published_at":"2026-04-22 14:16:41","updated_at":"2026-04-22 14:16:41"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/3527e9fdc38570cea0f6ddb7a2c9303d4044b217","name":"https://git.kernel.org/stable/c/3527e9fdc38570cea0f6ddb7a2c9303d4044b217","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/6557004a8b59c7701e695f02be03c7e20ed1cc15","name":"https://git.kernel.org/stable/c/6557004a8b59c7701e695f02be03c7e20ed1cc15","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/652cd0641a763dd0e846b0d12814977fadb2b7d8","name":"https://git.kernel.org/stable/c/652cd0641a763dd0e846b0d12814977fadb2b7d8","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-31457","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-31457","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d809a7c64ba8229286b333c0cba03b1cdfb50238 3527e9fdc38570cea0f6ddb7a2c9303d4044b217 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d809a7c64ba8229286b333c0cba03b1cdfb50238 652cd0641a763dd0e846b0d12814977fadb2b7d8 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected d809a7c64ba8229286b333c0cba03b1cdfb50238 6557004a8b59c7701e695f02be03c7e20ed1cc15 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.17","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.17 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.21 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.19.11 6.19.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.0 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"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->nr 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->nr. \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->nr 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"},"nvd":{"publishedDate":"2026-04-22 14:16:41","lastModifiedDate":"2026-04-22 14:16:41","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"31457","Ordinal":"1","Title":"mm/damon/sysfs: check contexts->nr in repeat_call_fn","CVE":"CVE-2026-31457","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"31457","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/damon/sysfs: check contexts->nr 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->nr. \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","Type":"Description","Title":"mm/damon/sysfs: check contexts->nr in repeat_call_fn"}]}}}