CVE-2026-46183: mm/damon/sysfs-schemes: protect path kfree() with damon_sysfs_lock
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
mm/damon/sysfs-schemes: protect path kfree() with damon_sysfs_lock
damon_sysfs_quot_goal->path can be read and written by users, via DAMON sysfs 'path' file. It can also be indirectly read, for the parameters {on,off}line committing to DAMON. The reads for parameters committing are protected by damon_sysfs_lock to avoid the sysfs files being destroyed while any of the parameters are being read. But the user-driven direct reads and writes are not protected by any lock, while the write is deallocating the path-pointing buffer. As a result, the readers could read the already freed buffer (user-after-free). Note that the user-reads don't race when the same open file is used by the writer, due to kernfs's open file locking. Nonetheless, doing the reads and writes with separate open files would be common. Fix it by protecting both the user-direct reads and writes with damon_sysfs_lock.
The Linux kernel CVE team has assigned CVE-2026-46183 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.19 with commit c41e253a411eb73a5ac651c14f40c2ea2f274ebd and fixed in 7.0.7 with commit a34ca3e33da4b924c66bcca3729bf68ec5936910 Issue introduced in 6.19 with commit c41e253a411eb73a5ac651c14f40c2ea2f274ebd and fixed in 7.1-rc2 with commit cf3b71421ca00807328c6d9cd242f9de3b77a4bf
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-46183
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/sysfs-schemes.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/a34ca3e33da4b924c66bcca3729bf68ec5936910 https://git.kernel.org/stable/c/cf3b71421ca00807328c6d9cd242f9de3b77a4bf