{"id":"CVE-2026-90006","summary":"samples/damon/mtier: handle damon_stop() failure","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nsamples/damon/mtier: handle damon_stop() failure\n\ndamon_sample_mtier_stop() assumes its damon_stop() call will always\nsuccessfully stops the two DAMON contexts.  Hence it deallocates the two\nDAMON contexts after the damon_stop() call.  However, if a given context\nis already stopped, damon_stop() fails and returns an error while letting\nthe DAMON contexts that have not yet stopped keep running.  This kind of\nunexpected early DAMON context stops could happen due to memory allocation\nfailures in kdamond_fn().  Because damon_sample_mtier_stop() just\ndeallocates all DAMON contexts with damon_target and damon_region objects\nthat are linked to the contexts, the execution of the unstopped DAMON\ncontext (kdamond) ends up using the memory that freed (use-after-free). \nFix the issue by separating the damon_stop() to be invoked per context.\n\nNote that DAMON_SYSFS also allows multiple DAMON contexts execution.  But,\nit calls damon_stop() for each context one by one.  Hence this issue is\nonly in mtier.\n\nFor the long term, it would be better to refactor damon_stop() to always\nensure stopping all contexts regardless of the failures in the middle. \nMake this fix in the current way, though, to keep it simple and easy to\nbackport.  I will do the refactoring later.\n\nThe issue was discovered [1] by Sashiko.","modified":"2026-09-18T03:46:16.604475233Z","published":"2026-09-16T10:33:15.423Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/90xxx/CVE-2026-90006.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/215f9a7e4f1dcfc05ebcdc5c1ad0ea0dcb47bd09"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3c07c57b894116ae26f01b84c68e68b538ada7ed"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9dc5b6d66fd51b103eff21ed0df3e292f489ebc0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/90xxx/CVE-2026-90006.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-90006"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"82a08bde3cf7bbbe90de57baa181bebf676582c7"},{"fixed":"3c07c57b894116ae26f01b84c68e68b538ada7ed"},{"fixed":"215f9a7e4f1dcfc05ebcdc5c1ad0ea0dcb47bd09"},{"fixed":"9dc5b6d66fd51b103eff21ed0df3e292f489ebc0"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-90006.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.16.0"},{"fixed":"6.18.51"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.2.5"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-90006.json"}}],"schema_version":"1.9.0"}