Skip to content
Heist/ feed
Back to feed
UnratedFix available

mm/damon/core: clear walk_control on inactive context in damos_walk()

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: mm/damon/core: clear walk_control on inactive context in damos_walk() damos_walk() sets ctx->walk_control to the caller-provided control structure before checking whether the context is running. If the context is inactive (damon_is_running() returns false), the function returns -EINVAL without clearing ctx->walk_control. This leaves a dangling pointer to a stack-allocated structure that will be freed when the caller returns. This is structurally identical to the bug fixed in commit f9132fbc2e83 ("mm/damon/core: remove call_control in inactive contexts") for damon_call(), which had the same pattern of linking a control object and returning an error without unlinking it. The dangling walk_control pointer can cause: 1. Use-after-free if the context is later started and kdamond dereferences ctx->walk_control (e.g., in damos_walk_cancel() which writes to control->canceled and calls complete()) 2. Permanent -EBUSY from subsequent damos_walk() calls, since the stale pointer is non-NULL Nonetheless, the real user impact is quite restrictive. The use-after-free is impossible because there is no damos_walk() callers who starts the context later. The permanent -EBUSY can actually confuse users, as DAMON is not running. But the symptom is kept only while the context is turned off. Turning it on again will make DAMON internally uses a newly generated damon_ctx object that doesn't have the invalid damos_walk_control pointe

Products
Kernel
Affected versions
Not specified
Fixed versions
6.18.19, 6.19.9
CVEs
CVE-2026-43388
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 00:39 UTC · Revision 1

Source evidence

mm/damon/core: clear walk_control on inactive context in damos_walk()

core-osv · Original source

Published 8 May 2026, 14:21 UTC

In the Linux kernel, the following vulnerability has been resolved: mm/damon/core: clear walk_control on inactive context in damos_walk() damos_walk() sets ctx->walk_control to the caller-provided control structure before checking whether the context is running. If the context is inactive (damon_is_running() returns false), the function returns -EINVAL without clearing ctx->walk_control. This leaves a dangling pointer to a stack-allocated structure that will be freed when the caller returns. This is structurally identical to the bug fixed in commit f9132fbc2e83 ("mm/damon/core: remove call_control in inactive contexts") for damon_call(), which had the same pattern of linking a control object and returning an error without unlinking it. The dangling walk_control pointer can cause: 1. Use-after-free if the context is later started and kdamond dereferences ctx->walk_control (e.g., in damos_walk_cancel() which writes to control->canceled and calls complete()) 2. Permanent -EBUSY from subsequent damos_walk() calls, since the stale pointer is non-NULL Nonetheless, the real user impact is quite restrictive. The use-after-free is impossible because there is no damos_walk() callers who starts the context later. The permanent -EBUSY can actually confuse users, as DAMON is not running. But the symptom is kept only while the context is turned off. Turning it on again will make DAMON internally uses a newly generated damon_ctx object that doesn't have the invalid damos_walk_control pointe

osv:CVE-2026-43388

Kernel

Fixed versions: 6.18.19, 6.19.9

Complete source record
{
  "id": "86211c3a33bbd8c35d72b8f8ce5366a97df7c1a815e469e88e6a7ba06214acd3",
  "url": "https://osv.dev/vulnerability/CVE-2026-43388",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "mm/damon/core: clear walk_control on inactive context in damos_walk()",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: mm/damon/core: clear walk_control on inactive context in damos_walk() damos_walk() sets ctx->walk_control to the caller-provided control structure before checking whether the context is running. If the context is inactive (damon_is_running() returns false), the function returns -EINVAL without clearing ctx->walk_control. This leaves a dangling pointer to a stack-allocated structure that will be freed when the caller returns. This is structurally identical to the bug fixed in commit f9132fbc2e83 (\"mm/damon/core: remove call_control in inactive contexts\") for damon_call(), which had the same pattern of linking a control object and returning an error without unlinking it. The dangling walk_control pointer can cause: 1. Use-after-free if the context is later started and kdamond dereferences ctx->walk_control (e.g., in damos_walk_cancel() which writes to control->canceled and calls complete()) 2. Permanent -EBUSY from subsequent damos_walk() calls, since the stale pointer is non-NULL Nonetheless, the real user impact is quite restrictive. The use-after-free is impossible because there is no damos_walk() callers who starts the context later. The permanent -EBUSY can actually confuse users, as DAMON is not running. But the symptom is kept only while the context is turned off. Turning it on again will make DAMON internally uses a newly generated damon_ctx object that doesn't have the invalid damos_walk_control pointe",
    "evidence": "osv:CVE-2026-43388",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.18.19",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.19.9",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-43388",
      "aliases": [
        "CVE-2026-43388"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "bf0eaba0ff9c9c8e6fd58ddfa1a8b6df4b813f61"
                },
                {
                  "fixed": "ce0aa47c963b8c3e5beace89e2b5a665a64b5b6b"
                },
                {
                  "fixed": "9320c77134ab8d7701e20608bbf08517df4fa321"
                },
                {
                  "fixed": "d210fdcac9c0d1380eab448aebc93f602c1cd4e6"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-43388.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.14.0"
                },
                {
                  "fixed": "6.18.19"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "6.19.9"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-43388.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:32.312930796Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/9320c77134ab8d7701e20608bbf08517df4fa321",
        "https://git.kernel.org/stable/c/ce0aa47c963b8c3e5beace89e2b5a665a64b5b6b",
        "https://git.kernel.org/stable/c/d210fdcac9c0d1380eab448aebc93f602c1cd4e6",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/43xxx/CVE-2026-43388.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-43388",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/43xxx/CVE-2026-43388.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-43388",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 499362,
  "published_at": "2026-05-08T14:21:33.966+00:00"
}