UBUNTU-CVE-2026-90006: Use After Free
In the Linux kernel, the following vulnerability has been resolved: samples/damon/mtier: handle damonstop() failure damonsamplemtierstop() assumes its damonstop() call will always successfully stops the two DAMON contexts. Hence it deallocates the two DAMON contexts after the damonstop() call. However, if a given context is already stopped, damonstop() fails and returns an error while letting the DAMON contexts that have not yet stopped keep running. This kind of unexpected early DAMON context stops could happen due to memory allocation failures in kdamondfn(). Because damonsamplemtierstop() just deallocates all DAMON contexts with damontarget and damonregion objects that are linked to the contexts, the execution of the unstopped DAMON context (kdamond) ends up using the memory that freed (use-after-free). Fix the issue by separating the damonstop() to be invoked per context. Note that DAMONSYSFS also allows multiple DAMON contexts execution. But, it calls damonstop() for each context one by one. Hence this issue is only in mtier. For the long term, it would be better to refactor damonstop() to always ensure stopping all contexts regardless of the failures in the middle. Make this fix in the current way, though, to keep it simple and easy to backport. I will do the refactoring later. The issue was discovered [1] by Sashiko.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-hwe-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42~24.04.1 - Upgrade
Upgrade
ubuntu/linux-riscv-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 7.0.0-42.42 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 7.0.0-1016.17 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 7.0.0-1016.18 - Upgrade
Upgrade
ubuntu/linux-ibmto a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oem-7.0to a version that resolves this vulnerability.Fixed in 7.0.0-1017.17 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 7.0.0-1015.16 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 7.0.0-42.42.1 - Compensating control
In samples/damon/mtier, invoke damon_stop() separately for each DAMON context and deallocate the two DAMON contexts only after the damon_stop() calls complete, so a failure stopping one context does not leave another context running while its memory is freed.