CVE-2025-38277
JSON

5.5medium

mtd: nand: ecc-mxic: Fix use of uninitialized variable ret

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
0.19% (higher than 9% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: mtd: nand: ecc-mxic: Fix use of uninitialized variable ret If ctx->steps is zero, the loop processing ECC steps is skipped, and the variable ret remains uninitialized. It is later checked and returned, which leads to undefined behavior and may cause unpredictable results in user space or kernel crashes. This scenario can be triggered in edge cases such as misconfigured geometry, ECC engine misuse, or if ctx->steps is not validated after initialization. Initialize ret to zero before the loop to ensure correct and safe behavior regardless of the ctx->steps value. Found by Linux Verification Center (linuxtesting.org) with SVACE.

Affected

Product or packageVersionsReported by
Linux Linuxfrom 48e6633a9fa2400b53a964358753769f291a7eb0 before 4d9d6e4be09472aa72953caca3dbefdc27846170, from 48e6633a9fa2400b53a964358753769f291a7eb0 before a0d9d9b5a4634e146ae41cb25667322e5c7d74d2, from 48e6633a9fa2400b53a964358753769f291a7eb0 before 7a23cc510ecaabab4f6df7e9d910d16e279b72ad, from 48e6633a9fa2400b53a964358753769f291a7eb0 before 49482f4a39620f6afedcd3f6aa9e0d558b6a460b, from 48e6633a9fa2400b53a964358753769f291a7eb0 before d95846350aac72303036a70c4cdc69ae314aa26d, 5.18
Not affected: before 5.18, from 6.1.142 up to 6.1.*, from 6.6.94 up to 6.6.*, from 6.12.34 up to 6.12.*, from 6.15.3 up to 6.15.*, from 6.16 up to *
CVE List
linux linux_kernelfrom 5.18 before 6.1.142, from 6.2 before 6.6.94, from 6.7 before 6.12.34, from 6.13 before 6.15.3NVD
debian debian_linux11.0NVD

Classification

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: mtd: nand: ecc-mxic: Fix use of uninitialized variable ret If ctx->steps is zero, the loop processing ECC steps is skipped, and the variable ret remains uninitialized. It is later checked and returned, which leads to undefined behavior and may cause unpredictable results in user space or kernel crashes. This scenario can be triggered in edge cases such as misconfigured geometry, ECC engine misuse, or if ctx->steps is not validated after initialization. Initialize ret to zero before the loop to ensure correct and safe behavior regardless of the ctx->steps value. Found by Linux Verification Center (linuxtesting.org) with SVACE.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: mtd: nand: ecc-mxic: Se corrige el uso de la variable ret sin inicializar. Si ctx->steps es cero, se omite el procesamiento del bucle de pasos ECC y la variable ret permanece sin inicializar. Posteriormente, se verifica y se devuelve, lo que genera un comportamiento indefinido y puede causar resultados impredecibles en el espacio de usuario o fallos del kernel. Este escenario puede activarse en casos extremos, como una geometría mal configurada, un uso indebido del motor ECC o si ctx->steps no se valida tras la inicialización. Inicialice ret a cero antes del bucle para garantizar un comportamiento correcto y seguro, independientemente del valor de ctx->steps. Encontrado por el Centro de Verificación de Linux (linuxtesting.org) con SVACE.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-38277 changed 2026-05-11CVE Terms of Use
NVDCVE-2025-38277 changed 2026-06-17Public domain