CVE-2025-38277

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

MEDIUM
5.5
CVSS Score
Published: July 10, 2025 at 07:41 AM UTC
Updated: June 17, 2026 at 09:16 AM UTC
2 products affected across 2 vendorsLinux KernelDebian Linux

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%

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

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.18 ≤ v < 6.1.1425.18 ≤ v < 6.12.345.18 ≤ v < 6.15.35.18 ≤ v < 6.165.18 ≤ v < 6.6.946.13 ≤ v < 6.15.36.2 ≤ v < 6.6.946.7 ≤ v < 6.12.3448e6633a9fa2400b53a964358753769f291a7eb05.18
Vendor states this is fixed in 49482f4a39620f6afedcd3f6aa9e0d558b6a460b (fixed)
Vendor states this is fixed in 4d9d6e4be09472aa72953caca3dbefdc27846170 (fixed)
Vendor states this is fixed in 7a23cc510ecaabab4f6df7e9d910d16e279b72ad (fixed)
Vendor states this is fixed in a0d9d9b5a4634e146ae41cb25667322e5c7d74d2 (fixed)
Vendor states this is fixed in d95846350aac72303036a70c4cdc69ae314aa26d (fixed)
Vendor states this is fixed in 5.18 (unaffected)
Vendor states this is fixed in 6.1.142 (unaffected)
Vendor states this is fixed in 6.12.34 (unaffected)
Vendor states this is fixed in 6.15.3 (unaffected)
Vendor states this is fixed in 6.16 (unaffected)
Vendor states this is fixed in 6.6.94 (unaffected)

References (6)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/49482f4a39620f6afedcd3f6aa9e0d558b6a460b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/4d9d6e4be09472aa72953caca3dbefdc27846170
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/7a23cc510ecaabab4f6df7e9d910d16e279b72ad
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/a0d9d9b5a4634e146ae41cb25667322e5c7d74d2
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/d95846350aac72303036a70c4cdc69ae314aa26d
Mailing ListThird Party Advisory
Source: af854a3a-2127-422b-91ae-364da2661108
https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusANALYZED
CWE
CWE-908

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card