CVE-2025-38277

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

published July 10, 2025

CVSS
—
EPSS
0%
Percentile
8.1
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS
Not scored
CVSS v4.0
Not supplied
EPSS
0.00189 · 8.1th percentile
Published
2025-07-10T07:41Z
EPSS history
Timeline
  • 10 JUL 07:41Z
    mtd: nand: ecc-mxic: Fix use of uninitialized variable ret
    cvelistv5