5.5medium
mm/damon/sysfs: fix wrong empty schemes assumption under online tuning in damon_sysfs_set_schemes()
- Severity
- 5.5medium CVSS:3.1 by NVD
- Exploit likelihood
- 0.26% (higher than 11% of CVEs)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: mm/damon/sysfs: fix wrong empty schemes assumption under online tuning in damon_sysfs_set_schemes() Commit da87878010e5 ("mm/damon/sysfs: support online inputs update") made 'damon_sysfs_set_schemes()' to be called for running DAMON context, which could have schemes. In the case, DAMON sysfs interface is supposed to update, remove, or add schemes to reflect the sysfs files. However, the code is assuming the DAMON context wouldn't have schemes at all, and therefore creates and adds new schemes. As a result, the code doesn't work as intended for online schemes tuning and could have more than expected memory footprint. The schemes are all in the DAMON context, so it doesn't leak the memory, though. Remove the wrong asssumption (the DAMON context wouldn't have schemes) in 'damon_sysfs_set_schemes()' to fix the bug.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from da87878010e59869d4d27b3c01ecc8ec06ff4a20 before f98d1f2a36ad7ab48fb4cf73ca14e7b19482fd4d, from da87878010e59869d4d27b3c01ecc8ec06ff4a20 before 95bc35f9bee5220dad4e8567654ab3288a181639, 5.19 Not affected: before 5.19, from 6.0.12 up to 6.0.*, from 6.1 up to * | CVE List |
| linux linux_kernel | from 5.19 before 6.0.12, 6.1 | NVD |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: mm/damon/sysfs: fix wrong empty schemes assumption under online tuning in damon_sysfs_set_schemes() Commit da87878010e5 ("mm/damon/sysfs: support online inputs update") made 'damon_sysfs_set_schemes()' to be called for running DAMON context, which could have schemes. In the case, DAMON sysfs interface is supposed to update, remove, or add schemes to reflect the sysfs files. However, the code is assuming the DAMON context wouldn't have schemes at all, and therefore creates and adds new schemes. As a result, the code doesn't work as intended for online schemes tuning and could have more than expected memory footprint. The schemes are all in the DAMON context, so it doesn't leak the memory, though. Remove the wrong asssumption (the DAMON context wouldn't have schemes) in 'damon_sysfs_set_schemes()' to fix the bug.
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: mm/damon/sysfs: se corrige la suposición incorrecta de esquemas vacíos durante el ajuste en línea en damon_sysfs_set_schemes(). el commit da87878010e5 ("mm/damon/sysfs: soporte para la actualización de entradas en línea") hizo que se llamara a 'damon_sysfs_set_schemes()' para ejecutar el contexto DAMON, que podría tener esquemas. En este caso, se supone que la interfaz sysfs de DAMON actualiza, elimina o agrega esquemas para reflejar los archivos sysfs. Sin embargo, el código asume que el contexto DAMON no tendría esquemas en absoluto y, por lo tanto, crea y agrega nuevos esquemas. Como resultado, el código no funciona como se esperaba para el ajuste de esquemas en línea y podría tener una huella de memoria mayor a la esperada. Todos los esquemas están en el contexto DAMON, por lo que no pierde memoria. Elimine la suposición incorrecta (el contexto DAMON no tendría esquemas) en 'damon_sysfs_set_schemes()' para corregir el error.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-48996 changed 2026-05-11 | CVE Terms of Use |
| NVD | CVE-2022-48996 changed 2026-06-17 | Public domain |