GHSA-P6JG-GM5J-8F2R

Vulnerability from github – Published: 2026-04-22 15:31 – Updated: 2026-04-22 15:31
VLAI?
Details

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
Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-31457"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-04-22T14:16:41Z",
    "severity": null
  },
  "details": "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",
  "id": "GHSA-p6jg-gm5j-8f2r",
  "modified": "2026-04-22T15:31:41Z",
  "published": "2026-04-22T15:31:41Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-31457"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/3527e9fdc38570cea0f6ddb7a2c9303d4044b217"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/652cd0641a763dd0e846b0d12814977fadb2b7d8"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/6557004a8b59c7701e695f02be03c7e20ed1cc15"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

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…

Detection rules are retrieved from Rulezet.

Loading…

Loading…