{
  "id": "CVE-2026-43388",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-43388",
  "published_at": "2026-05-08T14:21:33.966Z",
  "title": "mm/damon/core: clear walk_control on inactive context in damos_walk()",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "nvd",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "In the Linux kernel, the following vulnerability has been resolved:\n\nmm/damon/core: clear walk_control on inactive context in damos_walk()\n\ndamos_walk() sets ctx-\u003ewalk_control to the caller-provided control\nstructure before checking whether the context is running.  If the context\nis inactive (damon_is_running() returns false), the function returns\n-EINVAL without clearing ctx-\u003ewalk_control.  This leaves a dangling\npointer to a stack-allocated structure that will be freed when the caller\nreturns.\n\nThis is structurally identical to the bug fixed in commit f9132fbc2e83\n(\"mm/damon/core: remove call_control in inactive contexts\") for\ndamon_call(), which had the same pattern of linking a control object and\nreturning an error without unlinking it.\n\nThe dangling walk_control pointer can cause:\n1. Use-after-free if the context is later started and kdamond\n   dereferences ctx-\u003ewalk_control (e.g., in damos_walk_cancel()\n   which writes to control-\u003ecanceled and calls complete())\n2. Permanent -EBUSY from subsequent damos_walk() calls, since the\n   stale pointer is non-NULL\n\nNonetheless, the real user impact is quite restrictive.  The\nuse-after-free is impossible because there is no damos_walk() callers who\nstarts the context later.  The permanent -EBUSY can actually confuse\nusers, as DAMON is not running.  But the symptom is kept only while the\ncontext is turned off.  Turning it on again will make DAMON internally\nuses a newly generated damon_ctx object that doesn't have the invalid\ndamos_walk_control pointer, so everything will work fine again.\n\nFix this by clearing ctx-\u003ewalk_control under walk_control_lock before\nreturning -EINVAL, mirroring the fix pattern from f9132fbc2e83.",
  "cwe": "CWE-416",
  "cpes": [
    "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*",
    "cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*"
  ],
  "cvss_by_source": {
    "nvd": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= bf0eaba0ff9c9c8e6fd58ddfa1a8b6df4b813f61, \u003c ce0aa47c963b8c3e5beace89e2b5a665a64b5b6b",
          "\u003e= bf0eaba0ff9c9c8e6fd58ddfa1a8b6df4b813f61, \u003c 9320c77134ab8d7701e20608bbf08517df4fa321",
          "\u003e= bf0eaba0ff9c9c8e6fd58ddfa1a8b6df4b813f61, \u003c d210fdcac9c0d1380eab448aebc93f602c1cd4e6"
        ],
        "fixed_in": [
          "ce0aa47c963b8c3e5beace89e2b5a665a64b5b6b",
          "9320c77134ab8d7701e20608bbf08517df4fa321",
          "d210fdcac9c0d1380eab448aebc93f602c1cd4e6"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "6.14"
        ],
        "fixed_in": [
          "0",
          "6.18.19",
          "6.19.9",
          "7.0"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to ce0aa47c963b8c3e5beace89e2b5a665a64b5b6b or 9320c77134ab8d7701e20608bbf08517df4fa321 or d210fdcac9c0d1380eab448aebc93f602c1cd4e6 or later.",
      "Upgrade Linux to 0 or 6.18.19 or 6.19.9 or 7.0 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
