CVE-2026-139052

mtd: spi-nor: sfdp: check the length of the SCCR map

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

mtd: spi-nor: sfdp: check the length of the SCCR map

The spi_nor_parse_sccr() sizes its buffer from the table length the
flash reports in the SFDP parameter header. But it then reads DWORD1
and DWORD22 without ever checking the table is that long.

So if a flash reports a length of one, the buffer is only four bytes
while DWORD22 sits at byte offset 84. With a length of zero kmalloc()
returns ZERO_SIZE_PTR rather than an error, so the NULL check doesn't
catch it and the first read dereferences it.

To fix this, reject a table that's too short for the highest DWORD the
parser reads, the way spi_nor_parse_4bait() already does. The table is
optional, so this isn't fatal. The spi_nor_parse_sfdp() warns and
carries on.

The spi_nor_parse_sccr_mc() doesn't need the same check. It works out
the number of dice from the length it allocated with, so its highest
index stays inside the buffer.

Analysis

AI-generated

Technical impact

The Linux kernel contains a flaw in parsing the SFDP table for SPI NOR flash devices. The parser allocates a buffer based on the table length reported by the flash, then unconditionally reads data at positions beyond that length, including an offset that may be up to 84 bytes. This out‑of‑bounds read can dereference a NULL pointer and trigger a kernel crash, allowing an attacker to cause a denial of service and potentially leverage adjacent memory corruption if additional conditions are met. The vulnerability is a classic unintended buffer misuse and is classified as a buffer overflow/OOB read fault.

Affected Systems

All Linux kernel releases that include the spi_nor parsing code without the fix are affected. The vulnerability is present in the core kernel code that supports SPI NOR flash devices, regardless of distribution or architecture, as indicated by the generic CPE string for Linux kernel. Users running kernel versions prior to the patch commit referenced in the advisory should assess whether they use SPI NOR flash devices that expose an SFDP table.

Risk and Exploitability

No CVSS score or EPSS metric is provided, and the vulnerability is not listed in the CISA KEV catalog. The attack vector is inferred to be local or remote via a flash device that supplies a malformed SFDP table, which is common for embedded systems and storage devices. Because the bug occurs during normal flash initialization, an exploitable crash can be triggered by simply inserting the affected device or by forcing the kernel to re‑parse the SFDP table, making the exploit practical for anyone who can attach such a device. The lack of a public exploit reference means the exploitation likelihood is uncertain, but the potential impact of crashing the kernel warrants prompt mitigation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that includes the fix for spi_nor_parse_sccr, which validates table lengths before accessing them.
  • If an immediate kernel upgrade is not possible, restrict the system to flash devices that report correct SFDP tables or disable SPI NOR support until the patch can be applied.
  • Continuously monitor system logs for SFDP parsing warnings or kernel panics and treat repeated failures as indicators of an unpatched or misconfigured device.

Generated by OpenCVE AI on November 30, 2026 at 19:05 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-119
CWE-122
CWE-125
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: mtd: spi-nor: sfdp: check the length of the SCCR map The spi_nor_parse_sccr() sizes its buffer from the table length the flash reports in the SFDP parameter header. But it then reads DWORD1 and DWORD22 without ever checking the table is that long. So if a flash reports a length of one, the buffer is only four bytes while DWORD22 sits at byte offset 84. With a length of zero kmalloc() returns ZERO_SIZE_PTR rather than an error, so the NULL check doesn't catch it and the first read dereferences it. To fix this, reject a table that's too short for the highest DWORD the parser reads, the way spi_nor_parse_4bait() already does. The table is optional, so this isn't fatal. The spi_nor_parse_sfdp() warns and carries on. The spi_nor_parse_sccr_mc() doesn't need the same check. It works out the number of dice from the length it allocated with, so its highest index stays inside the buffer.
Title mtd: spi-nor: sfdp: check the length of the SCCR map
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-119

    Improper Restriction of Operations within the Bounds of a Memory Buffer

  • CWE-122

    Heap-based Buffer Overflow

  • CWE-125

    Out-of-bounds Read

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:27 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM