UBUNTU-CVE-2026-90005: Use After Free
In the Linux kernel, the following vulnerability has been resolved: samples/damon/wsse: handle damonstart() failure Patch series "samples/damon: handle damon{start,stop}() failures". All DAMON sample modules are not correctly handling failures from damonstart(). Among those, mtier also has an additional problem for handling of damonstop() failures. wsse and prcl also have a problem in their damoncall() failure handling. As a result, memory leaks, next DAMON operation disruptions, and use-after-free can happen. Fix those. Note that only the damonstart() failure caused issues can reliably be reproduced. Reproducing those issues require the admin permission, though. This patch (of 6): damonsamplewssestart() callers assume it will clean up resources when it fails. And the function does the cleanup for context buildup failures. However, it is not doing the cleanup for damonstart() failure. As a result, when damonstart() fails, it leaks the memory for DAMON context. Free the context in case of the failure to fix the issues. Note that the issue can reliably be reproduced because the module calls damonstart() in the exclusive mode. For example, $ sudo damo start $ echo $$ | sudo tee /sys/module/damonsamplewsse/parameters/targetpid $ echo Y | sudo tee /sys/module/damonsamplewsse/parameters/enabled $ sudo cat /proc/allocinfo | grep damonnewctx Because the first command is running another DAMON instance, the third command fails the damonstart() call because the new DAMON instance cannot exclusively run. And without this fix, by repeating the third and the fourth commands above, we can show the memory consumption is only increasing due to the leaks. It requires the sudo permission though. 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
Modify all DAMON sample modules to clean up and free the DAMON context when damon_start() fails; also handle damon_stop() failures in mtier and damon_call() failures in wsse and prcl.