CVE-2026-46087: mm/damon/stat: fix memory leak on damon_start() failure in damon_stat_start()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
mm/damon/stat: fix memory leak on damon_start() failure in damon_stat_start()
Destroy the DAMON context and reset the global pointer when damon_start() fails. Otherwise, the context allocated by damon_stat_build_ctx() is leaked, and the stale damon_stat_context pointer will be overwritten on the next enable attempt, making the old allocation permanently unreachable.
The Linux kernel CVE team has assigned CVE-2026-46087 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.17 with commit 369c415e60732b7c8ed33368891581246f580d7a and fixed in 6.18.27 with commit 8a62c58411cbd748d7aeab0e5b0963e33ff47a7a Issue introduced in 6.17 with commit 369c415e60732b7c8ed33368891581246f580d7a and fixed in 7.0.4 with commit 50bc1d7e0f3bb6932c8dc5da0907eead0790176b Issue introduced in 6.17 with commit 369c415e60732b7c8ed33368891581246f580d7a and fixed in 7.1-rc1 with commit e04ed278d25bf15769800bf6e35c6737f137186f
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-46087
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
mm/damon/stat.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/8a62c58411cbd748d7aeab0e5b0963e33ff47a7a https://git.kernel.org/stable/c/50bc1d7e0f3bb6932c8dc5da0907eead0790176b https://git.kernel.org/stable/c/e04ed278d25bf15769800bf6e35c6737f137186f