CVE-2023-53555: mm/damon/core: initialize damo_filter->list from damos_new_filter()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
mm/damon/core: initialize damo_filter->list from damos_new_filter()
damos_new_filter() is not initializing the list field of newly allocated filter object. However, DAMON sysfs interface and DAMON_RECLAIM are not initializing it after calling damos_new_filter(). As a result, accessing uninitialized memory is possible. Actually, adding multiple DAMOS filters via DAMON sysfs interface caused NULL pointer dereferencing. Initialize the field just after the allocation from damos_new_filter().
The Linux kernel CVE team has assigned CVE-2023-53555 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.3 with commit 98def236f63c66629fb6b2d4b69cecffc5b46539 and fixed in 6.4.11 with commit da7beebb49c643cd03c54447ed66595936a7a1ce Issue introduced in 6.3 with commit 98def236f63c66629fb6b2d4b69cecffc5b46539 and fixed in 6.5 with commit 5f1fc67f2cb8d3035d3acd273b48b97835af8afd
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-2023-53555
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/core.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/da7beebb49c643cd03c54447ed66595936a7a1ce https://git.kernel.org/stable/c/5f1fc67f2cb8d3035d3acd273b48b97835af8afd