CVE-2025-38277

Source
https://cve.org/CVERecord?id=CVE-2025-38277
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38277.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-38277
Downstream
Related
Published
2025-07-10T07:41:56.916Z
Modified
2026-03-12T02:14:42.720442Z
Summary
mtd: nand: ecc-mxic: Fix use of uninitialized variable ret
Details

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.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38277.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
48e6633a9fa2400b53a964358753769f291a7eb0
Fixed
4d9d6e4be09472aa72953caca3dbefdc27846170
Fixed
a0d9d9b5a4634e146ae41cb25667322e5c7d74d2
Fixed
7a23cc510ecaabab4f6df7e9d910d16e279b72ad
Fixed
49482f4a39620f6afedcd3f6aa9e0d558b6a460b
Fixed
d95846350aac72303036a70c4cdc69ae314aa26d

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-38277.json"