{"id":"CVE-2026-23012","summary":"mm/damon/core: remove call_control in inactive contexts","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nmm/damon/core: remove call_control in inactive contexts\n\nIf damon_call() is executed against a DAMON context that is not running,\nthe function returns error while keeping the damon_call_control object\nlinked to the context's call_controls list.  Let's suppose the object is\ndeallocated after the damon_call(), and yet another damon_call() is\nexecuted against the same context.  The function tries to add the new\ndamon_call_control object to the call_controls list, which still has the\npointer to the previous damon_call_control object, which is deallocated. \nAs a result, use-after-free happens.\n\nThis can actually be triggered using the DAMON sysfs interface.  It is not\neasily exploitable since it requires the sysfs write permission and making\na definitely weird file writes, though.  Please refer to the report for\nmore details about the issue reproduction steps.\n\nFix the issue by making two changes.  Firstly, move the final\nkdamond_call() for cancelling all existing damon_call() requests from\nterminating DAMON context to be done before the ctx-\u003ekdamond reset.  This\nmakes any code that sees NULL ctx-\u003ekdamond can safely assume the context\nmay not access damon_call() requests anymore.  Secondly, let damon_call()\nto cleanup the damon_call_control objects that were added to the\nalready-terminated DAMON context, before returning the error.","modified":"2026-04-02T13:11:45.368656Z","published":"2026-01-25T14:36:25.187Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23012.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/23b061f421eef03647b512f3df48861706c87db3"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f9132fbc2e83baf2c45a77043672a63a675c9394"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23012.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23012"},{"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":"004ded6bee11b8ed463cdc54b89a4390f4b64f6d"},{"fixed":"23b061f421eef03647b512f3df48861706c87db3"},{"fixed":"f9132fbc2e83baf2c45a77043672a63a675c9394"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-23012.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.17.0"},{"fixed":"6.18.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-23012.json"}}],"schema_version":"1.7.5"}