CVE-2024-57886
JSON

5.5medium

mm/damon/core: fix new damon_target objects leaks on damon_commit_targets()

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
0.18% (higher than 7% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: mm/damon/core: fix new damon_target objects leaks on damon_commit_targets() Patch series "mm/damon/core: fix memory leaks and ignored inputs from damon_commit_ctx()". Due to two bugs in damon_commit_targets() and damon_commit_schemes(), which are called from damon_commit_ctx(), some user inputs can be ignored, and some mmeory objects can be leaked. Fix those. Note that only DAMON sysfs interface users are affected. Other DAMON core API user modules that more focused more on simple and dedicated production usages, including DAMON_RECLAIM and DAMON_LRU_SORT are not using the buggy function in the way, so not affected. This patch (of 2): When new DAMON targets are added via damon_commit_targets(), the newly created targets are not deallocated when updating the internal data (damon_commit_target()) is failed. Worse yet, even if the setup is successfully done, the new target is not linked to the context. Hence, the new targets are always leaked regardless of the internal data setup failure. Fix the leaks.

Affected

Product or packageVersionsReported by
Linux Linuxfrom 9cb3d0b9dfce6a3258d91e6d69e418d0b4cce46a before 3647932d0b3e609c762c55e8f9fe10a09776e0a7, from 9cb3d0b9dfce6a3258d91e6d69e418d0b4cce46a before 8debfc5b1aa569d3d2ac836af2553da037611c61, 6.11
Not affected: before 6.11, from 6.12.9 up to 6.12.*, from 6.13 up to *
CVE List
linux linux_kernelfrom 6.11 before 6.12.9, 6.13NVD

Classification

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: mm/damon/core: fix new damon_target objects leaks on damon_commit_targets() Patch series "mm/damon/core: fix memory leaks and ignored inputs from damon_commit_ctx()". Due to two bugs in damon_commit_targets() and damon_commit_schemes(), which are called from damon_commit_ctx(), some user inputs can be ignored, and some mmeory objects can be leaked. Fix those. Note that only DAMON sysfs interface users are affected. Other DAMON core API user modules that more focused more on simple and dedicated production usages, including DAMON_RECLAIM and DAMON_LRU_SORT are not using the buggy function in the way, so not affected. This patch (of 2): When new DAMON targets are added via damon_commit_targets(), the newly created targets are not deallocated when updating the internal data (damon_commit_target()) is failed. Worse yet, even if the setup is successfully done, the new target is not linked to the context. Hence, the new targets are always leaked regardless of the internal data setup failure. Fix the leaks.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: mm/damon/core: corrige nuevas fugas de objetos damon_target en damon_commit_targets() Serie de parches "mm/damon/core: corrige fugas de memoria y entradas ignoradas de damon_commit_ctx()". Debido a dos errores en damon_commit_targets() y damon_commit_schemes(), que se llaman desde damon_commit_ctx(), algunas entradas de usuario pueden ignorarse y algunos objetos de memoria pueden filtrarse. Arréglelos. Tenga en cuenta que solo los usuarios de la interfaz sysfs de DAMON se ven afectados. Otros módulos de usuario de la API del núcleo de DAMON que se centran más en usos de producción simples y dedicados, incluidos DAMON_RECLAIM y DAMON_LRU_SORT, no utilizan la función con errores de la misma manera, por lo que no se ven afectados. Este parche (de 2): Cuando se agregan nuevos objetivos DAMON a través de damon_commit_targets(), los objetivos recién creados no se desasignan cuando falla la actualización de los datos internos (damon_commit_target()). Peor aún, incluso si la configuración se realiza correctamente, el nuevo objetivo no está vinculado al contexto. Por lo tanto, los nuevos objetivos siempre se filtran independientemente de la falla de configuración de los datos internos. Corrija las filtraciones.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-57886 changed 2026-05-11CVE Terms of Use
NVDCVE-2024-57886 changed 2026-06-17Public domain