CVE-2026-31445 Details
Description
In the Linux kernel, the following vulnerability has been resolved: mm/damon/core: avoid use of half-online-committed context One major usage of damon_call() is online DAMON parameters update. It is done by calling damon_commit_ctx() inside the damon_call() callback function. damon_commit_ctx() can fail for two reasons: 1) invalid parameters and 2) internal memory allocation failures. In case of failures, the damon_ctx that attempted to be updated (commit destination) can be partially updated (or, corrupted from a perspective), and therefore shouldn't be used anymore. The function only ensures the damon_ctx object can safely deallocated using damon_destroy_ctx(). The API callers are, however, calling damon_commit_ctx() only after asserting the parameters are valid, to avoid damon_commit_ctx() fails due to invalid input parameters. But it can still theoretically fail if the internal memory allocation fails. In the case, DAMON may run with the partially updated damon_ctx. This can result in unexpected behaviors including even NULL pointer dereference in case of damos_commit_dests() failure [1]. Such allocation failure is arguably too small to fail, so the real world impact would be rare. But, given the bad consequence, this needs to be fixed. Avoid such partially-committed (maybe-corrupted) damon_ctx use by saving the damon_commit_ctx() failure on the damon_ctx object. For this, introduce damon_ctx->maybe_corrupted field. damon_commit_ctx() sets it when it is failed. kdamond_call() checks if the field is set after each damon_call_control->fn() is executed. If it is set, ignore remaining callback requests and return. All kdamond_call() callers including kdamond_fn() also check the maybe_corrupted field right after kdamond_call() invocations. If the field is set, break the kdamond_fn() main loop so that DAMON sill doesn't use the context that might be corrupted. [[email protected]: let kdamond_call() with cancel regardless of maybe_corrupted]
A vulnerability in the Linux kernel's DAMON (Data Access Monitoring) subsystem can lead to the use of a corrupted context, potentially causing unexpected behavior such as a NULL pointer dereference. This issue arises during online parameter updates when the 'damon_commit_ctx()' function, which is responsible for committing context changes, fails due to internal memory allocation errors. Such failures can leave the context in a partially updated state, which DAMON may inadvertently use, leading to errors. Although the likelihood of this memory allocation failure occurring in practice is low, the consequences can be severe, necessitating a fix.
The vulnerability has been addressed by introducing a 'maybe_corrupted' field in the 'damon_ctx' structure. This field is set to true when 'damon_commit_ctx()' fails, indicating that the context may be corrupted. The 'kdamond_call()' function has been modified to check this field and cancel remaining callback requests if a corruption is detected. All callers of 'kdamond_call()' also check the 'maybe_corrupted' field before proceeding, ensuring that DAMON does not use a potentially corrupted context.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
No SSVC data is available for this CVE.
References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://git.kernel.org/stable/c/1b247cd0654a3a306996fa80741d79296c683a56 | kernel.org | Patch |
| https://git.kernel.org/stable/c/26f775a054c3cda86ad465a64141894a90a9e145 | kernel.org | Patch |
| https://git.kernel.org/stable/c/9c495f9d3781cd692bd199531cabd4627155e8cd | kernel.org | Patch |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-476 | NULL Pointer Dereference | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| linux linux kernel | >= 6.15, < 6.18.21 >= 6.19, < 6.19.11 7.0 rc1 7.0 rc2 7.0 rc3 7.0 rc4 7.0 rc5 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | kernel.org |
| May 7, 2026 | Initial Analysis | [email protected] |
| Apr 22, 2026 | New CVE Received | kernel.org |