
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-39877 is a use-after-free (UAF) vulnerability in the Linux kernel's mm/damon/sysfs module, specifically in the state_show() function. The flaw allows a local attacker with low privileges to trigger a race condition that accesses freed kernel memory. Affected kernel versions include 5.18 through 6.1.152, 6.2 through 6.6.106, 6.7 through 6.12.47, and 6.13 through 6.16.7, as well as Debian Linux 11.0. It was published on September 23, 2025, and carries a CVSS v3.1 base score of 7.8 (High) (Red Hat CVE, Feedly).
The root cause is a missing mutex lock in state_show() when reading kdamond->damon_ctx, classified as CWE-416 (Use After Free). A race condition arises when CPU 0 reads the context pointer while CPU 1 concurrently executes damon_sysfs_turn_damon_on(), damon_sysfs_kdamonds_rm_dirs(), or damon_sysfs_kdamond_release() — all of which destroy or replace the context under damon_sysfs_lock. CPU 0 then calls damon_is_running(ctx) and subsequently mutex_lock(&ctx->kdamond_lock) on the already-freed memory, resulting in a UAF. The fix involves acquiring damon_sysfs_lock in state_show() before dereferencing the context, mirroring the locking pattern already used in pid_show() (Feedly).
Successful exploitation can result in kernel panic (denial of service), disclosure of freed kernel memory contents (information disclosure), or potential arbitrary code execution in kernel context. Because the vulnerability operates at the kernel level, a successful exploit could grant an attacker full control over the affected system, enable privilege escalation from a low-privileged local user to root, and potentially facilitate lateral movement within a compromised environment (Feedly).
No public proof-of-concept exploit code is known to exist, and there is no evidence of active in-the-wild exploitation as of the time of this report (Feedly). The vulnerability requires local access with low privileges and the ability to trigger a race condition, which adds some practical complexity. The EPSS score is approximately 0.018% (0.000180), indicating a very low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
dmesg, /var/log/kern.log) showing kernel panics, general protection faults (GPF), or use-after-free KASAN/KFENCE reports referencing state_show, damon_is_running, or damon_sysfs functions./sys/kernel/mm/damon/admin/kdamonds/*/state).mm/damon/sysfs.c and mutex lock operations on freed memory.Update the Linux kernel to a patched version: 6.1.153 or later, 6.6.107 or later, 6.12.48 or later, or 6.16.8 or later. Patches are available via the Linux stable kernel tree at git.kernel.org (Kernel Patches). As a temporary workaround where patching is not immediately possible, restrict local user access and minimize the number of users with access to DAMON sysfs interfaces. Monitor system logs for kernel panic or memory corruption errors that may indicate exploitation attempts (Feedly).
Red Hat has acknowledged the vulnerability and published a CVE advisory page. Ubuntu has issued multiple security notices addressing this CVE (USN-8095-1 through USN-8095-5, USN-8100-1, USN-8125-1, USN-8165-1). Debian also addressed the issue via a LTS announcement. No notable independent researcher commentary or significant social media discussion has been identified beyond standard vulnerability tracking and vendor patch notifications (Red Hat CVE, Ubuntu USN-8095-1).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."