mtd: nand: ecc-mxic: Fix use of uninitialized variable ret
Vulnerability 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.
Impact Analysis
Refer to official advisory for detailed impact metrics.
Remediation
Ensure systems are updated to the latest vendor-supplied patch levels.
Am I Vulnerable?
Launch our assessment wizard to check if your infrastructure is exposed to • CVE-2025-38277
Credits & Attribution
No credits recorded in the NVD database.
References
- https://git.kernel.org/stable/c/4d9d6e4be09472aa72953caca3dbefdc27846170
- https://git.kernel.org/stable/c/a0d9d9b5a4634e146ae41cb25667322e5c7d74d2
- https://git.kernel.org/stable/c/7a23cc510ecaabab4f6df7e9d910d16e279b72ad
- https://git.kernel.org/stable/c/49482f4a39620f6afedcd3f6aa9e0d558b6a460b
- https://git.kernel.org/stable/c/d95846350aac72303036a70c4cdc69ae314aa26d
More from Linux
View All →Affected Vendor
Linux
View all reports →Affected Software
Timeline
CVSS Vectors
Weaknesses (CWE)
No CWE data available
MITRE ATT&CK TTPs
No associated TTPs found for this vulnerability.