Bug 2379208 (CVE-2025-38277) - CVE-2025-38277 kernel: mtd: nand: ecc-mxic: Fix use of uninitialized variable ret
Summary: CVE-2025-38277 kernel: mtd: nand: ecc-mxic: Fix use of uninitialized variable...
Keywords:
Status: NEW
Alias: CVE-2025-38277
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-07-10 08:03 UTC by OSIDB Bzimport
Modified: 2025-07-11 08:27 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-07-10 08:03:37 UTC
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.

Comment 1 Avinash Hanwate 2025-07-11 08:25:22 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025071009-CVE-2025-38277-520c@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.