CVE-2025-39877 Details
Description
In the Linux kernel, the following vulnerability has been resolved: mm/damon/sysfs: fix use-after-free in state_show() state_show() reads kdamond->damon_ctx without holding damon_sysfs_lock. This allows a use-after-free race: CPU 0 CPU 1 ----- ----- state_show() damon_sysfs_turn_damon_on() ctx = kdamond->damon_ctx; mutex_lock(&damon_sysfs_lock); damon_destroy_ctx(kdamond->damon_ctx); kdamond->damon_ctx = NULL; mutex_unlock(&damon_sysfs_lock); damon_is_running(ctx); /* ctx is freed */ mutex_lock(&ctx->kdamond_lock); /* UAF */ (The race can also occur with damon_sysfs_kdamonds_rm_dirs() and damon_sysfs_kdamond_release(), which free or replace the context under damon_sysfs_lock.) Fix by taking damon_sysfs_lock before dereferencing the context, mirroring the locking used in pid_show(). The bug has existed since state_show() first accessed kdamond->damon_ctx.
A use-after-free vulnerability has been identified in the Linux kernel's DAMON sysfs interface. The issue arises in the 'state_show()' function, which accesses 'kdamond->damon_ctx' without proper synchronization, creating a race condition. This vulnerability allows a context to be freed while still in use, potentially leading to arbitrary code execution or memory corruption. The flaw has existed since the DAMON monitoring feature was introduced.
The vulnerability has been fixed by ensuring that the sysfs lock is acquired before accessing the DAMON context, mirroring the locking mechanism used in other parts of the kernel. Users should upgrade to the latest stable version of the Linux kernel where this fix has been applied.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Nov 5, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/26d29b2ac87a2989071755f9828ebf839b560d4c | kernel.org | Patch |
| https://git.kernel.org/stable/c/3260a3f0828e06f5f13fac69fb1999a6d60d9cff | kernel.org | Patch |
| https://git.kernel.org/stable/c/3858c44341ad49dc7544b19cc9f9ecffaa7cc50e | kernel.org | Patch |
| https://git.kernel.org/stable/c/4e87f461d61959647464a94d11ae15c011be58ce | kernel.org | Patch |
| https://git.kernel.org/stable/c/60d7a3d2b985a395318faa1d88da6915fad11c19 | kernel.org | Patch |
| https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html | CVE | Mailing ListThird Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-416 | Use After Free | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 5.18, < 6.1.153 >= 6.2, < 6.6.107 >= 6.7, < 6.12.48 >= 6.13, < 6.16.8 6.17 rc1 6.17 rc2 6.17 rc3 6.17 rc4 6.17 rc5 |
CPE
Remediation
| |
| debian debian linux | 11.0 |
CPE
Remediation
| |
Change History
8 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Nov 5, 2026 | CVE Modified | kernel.org |
| Nov 5, 2026 | CVE Modified | CVE |
| Nov 5, 2026 | CVE Modified | CISA-ADP |
| Oct 19, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | kernel.org |
| Jan 20, 2026 | Initial Analysis | [email protected] |
| Nov 3, 2025 | CVE Modified | CVE |
| Sep 23, 2025 | New CVE Received | kernel.org |