CVE-2025-40228: mm/damon/sysfs: catch commit test ctx alloc failure

Published Dec 4, 2025
·
Updated

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

mm/damon/sysfs: catch commit test ctx alloc failure

Patch series "mm/damon/sysfs: fix commit test damonctx [de]allocation".

DAMON sysfs interface dynamically allocates and uses a damonctx object for testing if given inputs for online DAMON parameters update is valid. The object is being used without an allocation failure check, and leaked when the test succeeds. Fix the two bugs.

This patch (of 2):

The damonctx for testing online DAMON parameters commit inputs is used without its allocation failure check. This could result in an invalid memory access. Fix it by directly returning an error when the allocation failed.

Affected Software

1 affected component
Linux Kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In the Linux kernel DAMON sysfs commit-test path, check damon_ctx allocation failure and immediately return an error; also release the dynamically allocated damon_ctx after the test to prevent the leak.

Event History

Dec 4, 2025
CVE Published
via MITRE·03:31 PM
Data Sourced
via MITRE·03:31 PM
Description
Data Sourced
via NVD·04:16 PM
Description

Frequently Asked Questions

1

What is the severity of CVE-2025-40228?

The severity of CVE-2025-40228 is classified as medium due to potential memory allocation failures in the Linux kernel.

2

How do I fix CVE-2025-40228?

To fix CVE-2025-40228, update your Linux kernel to the latest version that includes the patch for this vulnerability.

3

What component is affected by CVE-2025-40228?

CVE-2025-40228 affects the DAMON sysfs interface within the Linux kernel.

4

When was CVE-2025-40228 identified?

CVE-2025-40228 was identified in 2025 as part of ongoing security assessments of the Linux kernel.

5

Are all Linux kernel versions vulnerable to CVE-2025-40228?

Not all Linux kernel versions are vulnerable; consult your specific version documentation for details on whether it is impacted.

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