Skip to content
Heist/ feed
Back to feed
UnratedFix available

mtd: spinand: fix NULL pointer dereference with no ECC engine

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: mtd: spinand: fix NULL pointer dereference with no ECC engine When "nand-no-ecc-engine" is set in DT, nanddev_get_ecc_engine() takes the NAND_ECC_ENGINE_TYPE_NONE path and returns success while leaving nand->ecc.engine NULL. The SPI-NAND code nevertheless dereferences it unconditionally to test for a pipelined engine, so probing such a device oopses immediately. Rather than open-coding the test three times, add a nand_ecc_is_pipelined() helper to the NAND core that folds the NULL check into the integration comparison, and use it everywhere. Future callers then cannot reintroduce the problem.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.1.191, 6.12.113, 6.18.56, 6.6.160, 7.2.10
CVEs
CVE-2026-98931
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 10:11 UTC · Revision 1

Source evidence

mtd: spinand: fix NULL pointer dereference with no ECC engine

core-osv · Original source

Published 23 Oct 2026, 12:11 UTC

In the Linux kernel, the following vulnerability has been resolved: mtd: spinand: fix NULL pointer dereference with no ECC engine When "nand-no-ecc-engine" is set in DT, nanddev_get_ecc_engine() takes the NAND_ECC_ENGINE_TYPE_NONE path and returns success while leaving nand->ecc.engine NULL. The SPI-NAND code nevertheless dereferences it unconditionally to test for a pipelined engine, so probing such a device oopses immediately. Rather than open-coding the test three times, add a nand_ecc_is_pipelined() helper to the NAND core that folds the NULL check into the integration comparison, and use it everywhere. Future callers then cannot reintroduce the problem.

osv:CVE-2026-98931

Kernel

Fixed versions: 6.1.191, 6.6.160, 6.12.113, 6.18.56, 7.2.10

Complete source record
{
  "id": "3f588461e60dd9be6f5b96f5e7f990f8dc3039ada1f336494684bddf58b8310d",
  "url": "https://osv.dev/vulnerability/CVE-2026-98931",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "mtd: spinand: fix NULL pointer dereference with no ECC engine",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: mtd: spinand: fix NULL pointer dereference with no ECC engine When \"nand-no-ecc-engine\" is set in DT, nanddev_get_ecc_engine() takes the NAND_ECC_ENGINE_TYPE_NONE path and returns success while leaving nand->ecc.engine NULL. The SPI-NAND code nevertheless dereferences it unconditionally to test for a pipelined engine, so probing such a device oopses immediately. Rather than open-coding the test three times, add a nand_ecc_is_pipelined() helper to the NAND core that folds the NULL check into the integration comparison, and use it everywhere. Future callers then cannot reintroduce the problem.",
    "evidence": "osv:CVE-2026-98931",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.1.191",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.160",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.113",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.18.56",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "7.2.10",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2026-98931",
      "aliases": [
        "CVE-2026-98931"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "f9d7c7265bcff7d9a17425a8cddf702e8fe159c2"
                },
                {
                  "fixed": "ab781c7840bb8a210156e25eb0c027d6097fb74d"
                },
                {
                  "fixed": "77c449c9c946fc420008dc55cd30f53749c915e4"
                },
                {
                  "fixed": "3c765fd5212c1bbc71568b1518a7ec963a7040b4"
                },
                {
                  "fixed": "80e8b0ea73ba295e92dfb6cf1c41df9da64234c6"
                },
                {
                  "fixed": "fc2f651f520394893b14b75281a01e502bfa73bb"
                },
                {
                  "fixed": "b890e6163761ddb580cc74f43e15f8bbde15647e"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98931.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.18.0"
                },
                {
                  "fixed": "6.1.191"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.160"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.113"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.18.56"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.19.0"
                },
                {
                  "fixed": "7.2.10"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-98931.json"
          }
        }
      ],
      "modified": "2026-11-01T02:31:02.413622170Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/3c765fd5212c1bbc71568b1518a7ec963a7040b4",
        "https://git.kernel.org/stable/c/77c449c9c946fc420008dc55cd30f53749c915e4",
        "https://git.kernel.org/stable/c/80e8b0ea73ba295e92dfb6cf1c41df9da64234c6",
        "https://git.kernel.org/stable/c/ab781c7840bb8a210156e25eb0c027d6097fb74d",
        "https://git.kernel.org/stable/c/b890e6163761ddb580cc74f43e15f8bbde15647e",
        "https://git.kernel.org/stable/c/fc2f651f520394893b14b75281a01e502bfa73bb",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/98xxx/CVE-2026-98931.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-98931",
        "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/2026/98xxx/CVE-2026-98931.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-98931",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 518971,
  "published_at": "2026-10-23T12:11:34.935+00:00"
}