{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-38277",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-04-16T04:51:23.998Z",
        "datePublished": "2025-07-10T07:41:56.916Z",
        "dateUpdated": "2026-05-11T21:24:45.797Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-05-11T21:24:45.797Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nmtd: nand: ecc-mxic: Fix use of uninitialized variable ret\n\nIf ctx->steps is zero, the loop processing ECC steps is skipped,\nand the variable ret remains uninitialized. It is later checked\nand returned, which leads to undefined behavior and may cause\nunpredictable results in user space or kernel crashes.\n\nThis scenario can be triggered in edge cases such as misconfigured\ngeometry, ECC engine misuse, or if ctx->steps is not validated\nafter initialization.\n\nInitialize ret to zero before the loop to ensure correct and safe\nbehavior regardless of the ctx->steps value.\n\nFound by Linux Verification Center (linuxtesting.org) with SVACE."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/mtd/nand/ecc-mxic.c"
                    ],
                    "versions": [
                        {
                            "version": "48e6633a9fa2400b53a964358753769f291a7eb0",
                            "lessThan": "4d9d6e4be09472aa72953caca3dbefdc27846170",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "48e6633a9fa2400b53a964358753769f291a7eb0",
                            "lessThan": "a0d9d9b5a4634e146ae41cb25667322e5c7d74d2",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "48e6633a9fa2400b53a964358753769f291a7eb0",
                            "lessThan": "7a23cc510ecaabab4f6df7e9d910d16e279b72ad",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "48e6633a9fa2400b53a964358753769f291a7eb0",
                            "lessThan": "49482f4a39620f6afedcd3f6aa9e0d558b6a460b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "48e6633a9fa2400b53a964358753769f291a7eb0",
                            "lessThan": "d95846350aac72303036a70c4cdc69ae314aa26d",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/mtd/nand/ecc-mxic.c"
                    ],
                    "versions": [
                        {
                            "version": "5.18",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.18",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.142",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.94",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.34",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.15.3",
                            "lessThanOrEqual": "6.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.16",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.18",
                                    "versionEndExcluding": "6.1.142"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.18",
                                    "versionEndExcluding": "6.6.94"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.18",
                                    "versionEndExcluding": "6.12.34"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.18",
                                    "versionEndExcluding": "6.15.3"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.18",
                                    "versionEndExcluding": "6.16"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/4d9d6e4be09472aa72953caca3dbefdc27846170"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a0d9d9b5a4634e146ae41cb25667322e5c7d74d2"
                },
                {
                    "url": "https://git.kernel.org/stable/c/7a23cc510ecaabab4f6df7e9d910d16e279b72ad"
                },
                {
                    "url": "https://git.kernel.org/stable/c/49482f4a39620f6afedcd3f6aa9e0d558b6a460b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d95846350aac72303036a70c4cdc69ae314aa26d"
                }
            ],
            "title": "mtd: nand: ecc-mxic: Fix use of uninitialized variable ret",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"
                    }
                ],
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2025-11-03T17:36:09.980Z"
                }
            }
        ]
    }
}