CVE-2025-39877: mm/damon/sysfs: fix use-after-free in state_show()

Published Sep 23, 2025
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

mm/damon/sysfs: fix use-after-free in stateshow()

stateshow() reads kdamond->damonctx without holding damonsysfslock. This allows a use-after-free race:

CPU 0 CPU 1 ----- ----- stateshow() damonsysfsturndamonon() ctx = kdamond->damonctx; mutexlock(&damonsysfslock); damondestroyctx(kdamond->damonctx); kdamond->damonctx = NULL; mutexunlock(&damonsysfslock); damonisrunning(ctx); / ctx is freed / mutexlock(&ctx->kdamondlock); / UAF /

(The race can also occur with damonsysfskdamondsrmdirs() and damonsysfskdamondrelease(), which free or replace the context under damonsysfslock.)

Fix by taking damonsysfslock before dereferencing the context, mirroring the locking used in pidshow().

The bug has existed since stateshow() first accessed kdamond->damonctx.

Affected Software

11 affected components
Linux Kernel
Linux Linux kernel>=5.18<6.1.153
Linux Linux kernel>=6.2<6.6.107
Linux Linux kernel>=6.7<6.12.48
Linux Linux kernel>=6.13<6.16.8
Linux Linux kernel=6.17-rc1
Linux Linux kernel=6.17-rc2
Linux Linux kernel=6.17-rc3
Linux Linux kernel=6.17-rc4
Linux Linux kernel=6.17-rc5
Debian Debian Linux=11.0

Event History

Sep 23, 2025
CVE Published
via MITRE·06:00 AM
Data Sourced
via MITRE·06:00 AM
Description
Data Sourced
via NVD·06:15 AM
RemedyDescriptionSeverityWeaknessAffected Software
Sep 24, 2025
Data Sourced
via Microsoft·01:01 AM
DescriptionSeverityWeakness
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-39877?

CVE-2025-39877 has a high severity due to the potential for a use-after-free vulnerability that could lead to remote code execution.

2

How do I fix CVE-2025-39877?

To fix CVE-2025-39877, update your Linux kernel to the latest patched version that addresses this vulnerability.

3

What impact does CVE-2025-39877 have on the Linux kernel?

CVE-2025-39877 allows for the possibility of unauthorized access and manipulation of data due to a race condition in state_show().

4

Who is affected by CVE-2025-39877?

Any system running an unpatched version of the Linux kernel is potentially affected by CVE-2025-39877.

5

Is CVE-2025-39877 being actively exploited?

As of now, there are no confirmed reports of CVE-2025-39877 being actively exploited in the wild.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203