VYPR
Unrated severityNVD Advisory· Published Dec 4, 2025· Updated Apr 15, 2026

CVE-2025-40228

CVE-2025-40228

Description

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 damon_ctx [de]allocation".

DAMON sysfs interface dynamically allocates and uses a damon_ctx 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 damon_ctx 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.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

The Linux kernel's DAMON sysfs interface lacks a NULL-check after allocating a damon_ctx object for testing parameter updates, risking a null-pointer dereference.

Vulnerability

In the Linux kernel, the DAMON (Data Access Monitoring) sysfs interface dynamically allocates a damon_ctx object to test whether a user's proposed online parameter update is valid. The allocation is performed without a failure check, meaning if kzalloc (or equivalent) returns NULL due to memory pressure, the code proceeds to use the NULL pointer, leading to a potential null-pointer dereference and system crash [1]. This bug was introduced when the commit-test mechanism was added.

Exploitation

An attacker with the ability to write to DAMON sysfs files—typically requiring root privileges or local access to sysfs—could trigger the allocation failure by inducing memory pressure (e.g., exhausting slab memory). If the allocation fails, the subsequent access to the NULL damon_ctx pointer causes a kernel oops, making the system unreliable or crashing it. No authentication is needed beyond the ability to modify DAMON sysfs parameters.

Impact

Successful exploitation results in a denial-of-service condition: the kernel enters an invalid memory access path, likely causing a system panic or hang. In a container or multi-tenant environment, a malicious user with sufficient privileges could disrupt the entire host. There is no evidence of privilege escalation or data leakage beyond the crash.

Mitigation

The fix is merged into the Linux kernel stable branch as commit [1] and [2] (part of a two-patch series). The patch directly returns an error (-ENOMEM) when the allocation fails, preventing the null-pointer use. Systems running unpatched kernels (versions where the DAMON sysfs commit-test feature exists) are vulnerable. Administrators should apply the update or backport the fix.

AI Insight generated on May 19, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2
  • Linux/Kernelinferred2 versions
    (expand)+ 1 more
    • (no CPE)
    • (no CPE)

Patches

2

Vulnerability mechanics

Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

2

News mentions

0

No linked articles in our index yet.