CVE-2025-38277

published 10 Jul 2025 · updated 11 May 2026

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

7.1HighCVSS 7.1EPSS 0%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel 49482f4a39620f6afedcd3f6aa9e0d558b6a460b, Kernel 4d9d6e4be09472aa72953caca3dbefdc27846170, Kernel 7a23cc510ecaabab4f6df7e9d910d16e279b72ad and 2 more.

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

Vendors, products and packages with version ranges

VendorProductVersionsFixed
LinuxKernel=5.18, >=48e6633a9fa2400b53a964358753769f291a7eb0 <49482f4a39620f6afedcd3f6aa9e0d558b6a460b, >=48e6633a9fa2400b53a964358753769f291a7eb0 <4d9d6e4be09472aa72953caca3dbefdc27846170, >=48e6633a9fa2400b53a964358753769f291a7eb0 <7a23cc510ecaabab4f6df7e9d910d16e279b72ad, >=48e6633a9fa2400b53a964358753769f291a7eb0 <a0d9d9b5a4634e146ae41cb25667322e5c7d74d2, >=48e6633a9fa2400b53a964358753769f291a7eb0 <d95846350aac72303036a70c4cdc69ae314aa26d49482f4a39620f6afedcd3f6aa9e0d558b6a460b, 4d9d6e4be09472aa72953caca3dbefdc27846170, 7a23cc510ecaabab4f6df7e9d910d16e279b72ad, a0d9d9b5a4634e146ae41cb25667322e5c7d74d2, d95846350aac72303036a70c4cdc69ae314aa26d

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in Kernel, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2025-38277 severity on Zeptric[![CVE-2025-38277](https://zeptric.io/badge/cve/CVE-2025-38277.svg)](https://zeptric.io/cve/CVE-2025-38277)