{"api_version":"1","generated_at":"2026-05-13T13:33:33+00:00","cve":"CVE-2026-43388","urls":{"html":"https://cve.report/CVE-2026-43388","api":"https://cve.report/api/cve/CVE-2026-43388.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-43388","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-43388"},"summary":{"title":"mm/damon/core: clear walk_control on inactive context in damos_walk()","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->walk_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->walk_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->walk_control (e.g., in damos_walk_cancel()\n   which writes to control->canceled 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->walk_control under walk_control_lock before\nreturning -EINVAL, mirroring the fix pattern from f9132fbc2e83.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-05-08 15:16:50","updated_at":"2026-05-12 14:10:27"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/ce0aa47c963b8c3e5beace89e2b5a665a64b5b6b","name":"https://git.kernel.org/stable/c/ce0aa47c963b8c3e5beace89e2b5a665a64b5b6b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/9320c77134ab8d7701e20608bbf08517df4fa321","name":"https://git.kernel.org/stable/c/9320c77134ab8d7701e20608bbf08517df4fa321","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/d210fdcac9c0d1380eab448aebc93f602c1cd4e6","name":"https://git.kernel.org/stable/c/d210fdcac9c0d1380eab448aebc93f602c1cd4e6","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-43388","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-43388","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected bf0eaba0ff9c9c8e6fd58ddfa1a8b6df4b813f61 ce0aa47c963b8c3e5beace89e2b5a665a64b5b6b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected bf0eaba0ff9c9c8e6fd58ddfa1a8b6df4b813f61 9320c77134ab8d7701e20608bbf08517df4fa321 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected bf0eaba0ff9c9c8e6fd58ddfa1a8b6df4b813f61 d210fdcac9c0d1380eab448aebc93f602c1cd4e6 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.14","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.14 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.19 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.19.9 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":{"cve_year":"2026","cve_id":"43388","cve":"CVE-2026-43388","epss":"0.000170000","percentile":"0.041320000","score_date":"2026-05-12","updated_at":"2026-05-13 00:11:53"},"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["mm/damon/core.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"ce0aa47c963b8c3e5beace89e2b5a665a64b5b6b","status":"affected","version":"bf0eaba0ff9c9c8e6fd58ddfa1a8b6df4b813f61","versionType":"git"},{"lessThan":"9320c77134ab8d7701e20608bbf08517df4fa321","status":"affected","version":"bf0eaba0ff9c9c8e6fd58ddfa1a8b6df4b813f61","versionType":"git"},{"lessThan":"d210fdcac9c0d1380eab448aebc93f602c1cd4e6","status":"affected","version":"bf0eaba0ff9c9c8e6fd58ddfa1a8b6df4b813f61","versionType":"git"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["mm/damon/core.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.14"},{"lessThan":"6.14","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.19","versionType":"semver"},{"lessThanOrEqual":"6.19.*","status":"unaffected","version":"6.19.9","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.19","versionStartIncluding":"6.14","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.19.9","versionStartIncluding":"6.14","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.0","versionStartIncluding":"6.14","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"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->walk_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->walk_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->walk_control (e.g., in damos_walk_cancel()\n   which writes to control->canceled 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->walk_control under walk_control_lock before\nreturning -EINVAL, mirroring the fix pattern from f9132fbc2e83."}],"providerMetadata":{"dateUpdated":"2026-05-11T22:23:37.300Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/ce0aa47c963b8c3e5beace89e2b5a665a64b5b6b"},{"url":"https://git.kernel.org/stable/c/9320c77134ab8d7701e20608bbf08517df4fa321"},{"url":"https://git.kernel.org/stable/c/d210fdcac9c0d1380eab448aebc93f602c1cd4e6"}],"title":"mm/damon/core: clear walk_control on inactive context in damos_walk()","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-43388","datePublished":"2026-05-08T14:21:33.966Z","dateReserved":"2026-05-01T14:12:56.006Z","dateUpdated":"2026-05-11T22:23:37.300Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-05-08 15:16:50","lastModifiedDate":"2026-05-12 14:10:27","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"43388","Ordinal":"1","Title":"mm/damon/core: clear walk_control on inactive context in damos_w","CVE":"CVE-2026-43388","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"43388","Ordinal":"1","NoteData":"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->walk_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->walk_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->walk_control (e.g., in damos_walk_cancel()\n   which writes to control->canceled 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->walk_control under walk_control_lock before\nreturning -EINVAL, mirroring the fix pattern from f9132fbc2e83.","Type":"Description","Title":"mm/damon/core: clear walk_control on inactive context in damos_w"}]}}}