CVE-2025-39877: mm/damon/sysfs: fix use-after-free in state_show()
Vulnerability summary
CVE-2025-39877 is a high (CVSS 7.8) Use After Free vulnerability in debian debian_linux. EPSS estimates a 0.15% chance of exploitation in the next 30 days, higher than 4.5% of scored vulnerabilities.
Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 18 · Related 15Timeline
- 23-09-2025PublishedVulnerability first disclosed.
- 11-05-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
3 scores · 3 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated7.8HighCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
0.15%
Chance of exploitation in the next 30 days
Percentile
5%
Versus all other CVEs
30-day change
No change 0.00 pp
From 0.15% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: local access, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Ubuntu122 products
- linux< 6.8.0-106.106
- linux-allwinner-5.19All versions (No fix recorded)
- linux-aws< 6.8.0-1050.53
- linux-aws-5.0All versions (No fix recorded)
- linux-aws-5.11All versions (No fix recorded)
Debian2 products
- linux< 6.1.153-1 | < 6.12.48-1 | < 6.16.8-1
- debian_linuxEOL11.0
Linux2 products
- linux≥ a61ea561c87139992fe32afdee48a6f6b85d824a, < 3858c44341ad49dc7544b19cc9f9ecffaa7cc50e | ≥ a61ea561c87139992fe32afdee48a6f6b85d824a, < 60d7a3d2b985a395318faa1d88da6915fad11c19 | ≥ a61ea561c87139992fe32afdee48a6f6b85d824a, < 26d29b2ac87a2989071755f9828ebf839b560d4c | ≥ a61ea561c87139992fe32afdee48a6f6b85d824a, < 4e87f461d61959647464a94d11ae15c011be58ce | ≥ a61ea561c87139992fe32afdee48a6f6b85d824a, < 3260a3f0828e06f5f13fac69fb1999a6d60d9cff | 5.18
- 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
3 vendors · 126 products