Skip to content
Heist/ feed
Back to feed
UnratedFix available

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

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.1.142, 6.12.34, 6.15.3, 6.6.94
CVEs
CVE-2025-38277
Confirmed fixed CVEs
Not specified
Updated in this feed
5 Nov 2026, 10:46 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 10 Jul 2025, 07:41 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.

osv:CVE-2025-38277

Kernel

Fixed versions: 6.1.142, 6.6.94, 6.12.34, 6.15.3

Complete source record
{
  "id": "6dc7a83a048db0c47fb59a0ddcb59d25eb8e40a5acfad198f94ffc579fad2909",
  "url": "https://osv.dev/vulnerability/CVE-2025-38277",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "mtd: nand: ecc-mxic: Fix use of uninitialized variable ret",
    "summary": "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.",
    "evidence": "osv:CVE-2025-38277",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.1.142",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.94",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.34",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.15.3",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2025-38277",
      "aliases": [
        "CVE-2025-38277"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "48e6633a9fa2400b53a964358753769f291a7eb0"
                },
                {
                  "fixed": "4d9d6e4be09472aa72953caca3dbefdc27846170"
                },
                {
                  "fixed": "a0d9d9b5a4634e146ae41cb25667322e5c7d74d2"
                },
                {
                  "fixed": "7a23cc510ecaabab4f6df7e9d910d16e279b72ad"
                },
                {
                  "fixed": "49482f4a39620f6afedcd3f6aa9e0d558b6a460b"
                },
                {
                  "fixed": "d95846350aac72303036a70c4cdc69ae314aa26d"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38277.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.18.0"
                },
                {
                  "fixed": "6.1.142"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.94"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.34"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.15.3"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38277.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:43.963171487Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/49482f4a39620f6afedcd3f6aa9e0d558b6a460b",
        "https://git.kernel.org/stable/c/4d9d6e4be09472aa72953caca3dbefdc27846170",
        "https://git.kernel.org/stable/c/7a23cc510ecaabab4f6df7e9d910d16e279b72ad",
        "https://git.kernel.org/stable/c/a0d9d9b5a4634e146ae41cb25667322e5c7d74d2",
        "https://git.kernel.org/stable/c/d95846350aac72303036a70c4cdc69ae314aa26d",
        "https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38277.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-38277",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38277.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-38277",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 511661,
  "published_at": "2025-07-10T07:41:56.916+00:00"
}