CVE-2026-31445

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. [sj@kernel.org: let kdamond_call() with cancel regardless of maybe_corrupted]
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*

History

11 Nov 2026, 23:10

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: mm/damon/core: evitar el uso de contexto medio-online-commitado Un uso principal de damon_call() es la actualización de parámetros DAMON en línea. Se realiza llamando a damon_commit_ctx() dentro de la función de callback damon_call(). damon_commit_ctx() puede fallar por dos razones: 1) parámetros inválidos y 2) fallos de asignación de memoria interna. En caso de fallos, el damon_ctx que intentó ser actualizado (destino de commit) puede ser parcialmente actualizado (o, corrompido desde una perspectiva), y por lo tanto no debería usarse más. La función solo asegura que el objeto damon_ctx puede ser desasignado de forma segura usando damon_destroy_ctx(). Los llamadores de la API están, sin embargo, llamando a damon_commit_ctx() solo después de afirmar que los parámetros son válidos, para evitar que damon_commit_ctx() falle debido a parámetros de entrada inválidos. Pero aún puede fallar teóricamente si la asignación de memoria interna falla. En ese caso, DAMON puede ejecutarse con el damon_ctx parcialmente actualizado. Esto puede resultar en comportamientos inesperados, incluyendo incluso la desreferencia de puntero NULL en caso de fallo de damos_commit_dests() [1]. Tal fallo de asignación es, discutiblemente, demasiado pequeño para fallar, por lo que el impacto en el mundo real sería raro. Pero, dada la mala consecuencia, esto necesita ser arreglado. Evitar el uso de dicho damon_ctx parcialmente-commitado (quizás-corrompido) guardando el fallo de damon_commit_ctx() en el objeto damon_ctx. Para esto, se introduce el campo damon_ctx -> maybe_corrupted. damon_commit_ctx() lo establece cuando falla. kdamond_call() verifica si el campo está establecido después de que se ejecuta cada damon_call_control -> fn(). Si está establecido, ignorar las solicitudes de callback restantes y retornar. Todos los llamadores de kdamond_call(), incluyendo kdamond_fn(), también verifican el campo maybe_corrupted justo después de las invocaciones de kdamond_call(). Si el campo está establecido, romper el bucle principal de kdamond_fn() para que DAMON siga sin usar el contexto que podría estar corrompido. [sj@kernel.org: permitir kdamond_call() con cancelación independientemente de maybe_corrupted]

07 May 2026, 19:23

Type Values Removed Values Added
CPE cpe:2.3:o:linux:linux_kernel:7.0:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:7.0:rc5:*:*:*:*:*:*
CWE CWE-476
References () https://git.kernel.org/stable/c/1b247cd0654a3a306996fa80741d79296c683a56 - () https://git.kernel.org/stable/c/1b247cd0654a3a306996fa80741d79296c683a56 - Patch
References () https://git.kernel.org/stable/c/26f775a054c3cda86ad465a64141894a90a9e145 - () https://git.kernel.org/stable/c/26f775a054c3cda86ad465a64141894a90a9e145 - Patch
References () https://git.kernel.org/stable/c/9c495f9d3781cd692bd199531cabd4627155e8cd - () https://git.kernel.org/stable/c/9c495f9d3781cd692bd199531cabd4627155e8cd - Patch
First Time Linux linux Kernel
Linux
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5

22 Apr 2026, 14:16

Type Values Removed Values Added
New CVE

Information

Published : 2026-04-22 14:16

Updated : 2026-11-11 23:10


NVD link : CVE-2026-31445

Mitre link : CVE-2026-31445

CVE.ORG link : CVE-2026-31445


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-476

NULL Pointer Dereference