* CVE-2026-139053: mtd: spi-nor: sfdp: check the length of the xSPI Profile 1.0 table
@ 2026-11-30 13:29 Greg Kroah-Hartman
0 siblings, 0 replies; only message in thread
From: Greg Kroah-Hartman @ 2026-11-30 13:29 UTC (permalink / raw)
To: linux-cve-announce; +Cc: Greg Kroah-Hartman
From: Greg Kroah-Hartman <gregkh@kernel.org>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
mtd: spi-nor: sfdp: check the length of the xSPI Profile 1.0 table
The spi_nor_parse_profile1() sizes its buffer from the table length the
flash reports in the SFDP parameter header. But it then reads DWORD1,
DWORD4 and DWORD5 without ever checking the table is that long.
So if a flash reports a length of one, the buffer is only four bytes
while DWORD4 and DWORD5 sit at byte offsets 12 and 16. 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. And the value
doesn't just get thrown away. It ends up as the dummy cycle count for
8D-8D-8D fast reads.
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 Linux kernel CVE team has assigned CVE-2026-139053 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.11 with commit fb27f198971a68fec59d5493b68e35e916fce62c and fixed in 5.15.226 with commit 7d720359eeddb899cd551a08c153212eac836585
Issue introduced in 5.11 with commit fb27f198971a68fec59d5493b68e35e916fce62c and fixed in 6.1.193 with commit 4ab99807528307874f5b8ff3d9ad421d970d2fa5
Issue introduced in 5.11 with commit fb27f198971a68fec59d5493b68e35e916fce62c and fixed in 6.6.163 with commit c5525a1021c76856fb0c4f9d0dddfeef25d72b9c
Issue introduced in 5.11 with commit fb27f198971a68fec59d5493b68e35e916fce62c and fixed in 6.12.117 with commit 8cc513aa794d25cd6cf4dfe054eba600d4f813a5
Issue introduced in 5.11 with commit fb27f198971a68fec59d5493b68e35e916fce62c and fixed in 6.18.63 with commit 8cbeaea4d325f0fc980736b44a06dd1a30e177ff
Issue introduced in 5.11 with commit fb27f198971a68fec59d5493b68e35e916fce62c and fixed in 7.3.4 with commit a5de200ac41bede9ef7f7f173e76f50fe6d5ca71
Issue introduced in 5.11 with commit fb27f198971a68fec59d5493b68e35e916fce62c and fixed in 7.4-rc1 with commit b9f34a95a81021fa1f3c9cb8cfd458e66824cad6
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-139053
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/mtd/spi-nor/sfdp.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/7d720359eeddb899cd551a08c153212eac836585
https://git.kernel.org/stable/c/4ab99807528307874f5b8ff3d9ad421d970d2fa5
https://git.kernel.org/stable/c/c5525a1021c76856fb0c4f9d0dddfeef25d72b9c
https://git.kernel.org/stable/c/8cc513aa794d25cd6cf4dfe054eba600d4f813a5
https://git.kernel.org/stable/c/8cbeaea4d325f0fc980736b44a06dd1a30e177ff
https://git.kernel.org/stable/c/a5de200ac41bede9ef7f7f173e76f50fe6d5ca71
https://git.kernel.org/stable/c/b9f34a95a81021fa1f3c9cb8cfd458e66824cad6
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-30 13:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 13:29 CVE-2026-139053: mtd: spi-nor: sfdp: check the length of the xSPI Profile 1.0 table Greg Kroah-Hartman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.