{"id":"CVE-2026-139053","state":"PUBLISHED","title":"mtd: spi-nor: sfdp: check the length of the xSPI Profile 1.0 table","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmtd: spi-nor: sfdp: check the length of the xSPI Profile 1.0 table\n\nThe spi_nor_parse_profile1() sizes its buffer from the table length the\nflash reports in the SFDP parameter header. But it then reads DWORD1,\nDWORD4 and DWORD5 without ever checking the table is that long.\n\nSo if a flash reports a length of one, the buffer is only four bytes\nwhile DWORD4 and DWORD5 sit at byte offsets 12 and 16. With a length of\nzero kmalloc() returns ZERO_SIZE_PTR rather than an error, so the NULL\ncheck doesn't catch it and the first read dereferences it. And the value\ndoesn't just get thrown away. It ends up as the dummy cycle count for\n8D-8D-8D fast reads.\n\nTo fix this, reject a table that's too short for the highest DWORD the\nparser reads, the way spi_nor_parse_4bait() already does. The table is\noptional, so this isn't fatal. The spi_nor_parse_sfdp() warns and\ncarries on.","publishedAt":"2026-11-30T13:27:25.833Z","updatedAt":"2026-11-30T13:27:25.833Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"fb27f198971a68fec59d5493b68e35e916fce62c","status":"affected","lessThan":"7d720359eeddb899cd551a08c153212eac836585","versionType":"git"},{"version":"fb27f198971a68fec59d5493b68e35e916fce62c","status":"affected","lessThan":"4ab99807528307874f5b8ff3d9ad421d970d2fa5","versionType":"git"},{"version":"fb27f198971a68fec59d5493b68e35e916fce62c","status":"affected","lessThan":"c5525a1021c76856fb0c4f9d0dddfeef25d72b9c","versionType":"git"},{"version":"fb27f198971a68fec59d5493b68e35e916fce62c","status":"affected","lessThan":"8cc513aa794d25cd6cf4dfe054eba600d4f813a5","versionType":"git"},{"version":"fb27f198971a68fec59d5493b68e35e916fce62c","status":"affected","lessThan":"8cbeaea4d325f0fc980736b44a06dd1a30e177ff","versionType":"git"},{"version":"fb27f198971a68fec59d5493b68e35e916fce62c","status":"affected","lessThan":"a5de200ac41bede9ef7f7f173e76f50fe6d5ca71","versionType":"git"},{"version":"fb27f198971a68fec59d5493b68e35e916fce62c","status":"affected","lessThan":"b9f34a95a81021fa1f3c9cb8cfd458e66824cad6","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/mtd/spi-nor/sfdp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.11","versionType":"semver"},{"version":"5.15.226","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.193","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.63","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.4","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/mtd/spi-nor/sfdp.c"]}],"references":["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"],"weaknesses":[],"ingestedAt":"2026-11-30T13:42:04.437Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139053.json","commit":"5317bbbde1916a58cb1fadabb726eb126daf44c1","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139053","state":"PUBLISHED","datePublished":"2026-11-30T13:27:25.833Z","dateUpdated":"2026-11-30T13:27:25.833Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.911Z"},"containers":{"cna":{"title":"mtd: spi-nor: sfdp: check the length of the xSPI Profile 1.0 table","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmtd: spi-nor: sfdp: check the length of the xSPI Profile 1.0 table\n\nThe spi_nor_parse_profile1() sizes its buffer from the table length the\nflash reports in the SFDP parameter header. But it then reads DWORD1,\nDWORD4 and DWORD5 without ever checking the table is that long.\n\nSo if a flash reports a length of one, the buffer is only four bytes\nwhile DWORD4 and DWORD5 sit at byte offsets 12 and 16. With a length of\nzero kmalloc() returns ZERO_SIZE_PTR rather than an error, so the NULL\ncheck doesn't catch it and the first read dereferences it. And the value\ndoesn't just get thrown away. It ends up as the dummy cycle count for\n8D-8D-8D fast reads.\n\nTo fix this, reject a table that's too short for the highest DWORD the\nparser reads, the way spi_nor_parse_4bait() already does. The table is\noptional, so this isn't fatal. The spi_nor_parse_sfdp() warns and\ncarries on."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"fb27f198971a68fec59d5493b68e35e916fce62c","status":"affected","lessThan":"7d720359eeddb899cd551a08c153212eac836585","versionType":"git"},{"version":"fb27f198971a68fec59d5493b68e35e916fce62c","status":"affected","lessThan":"4ab99807528307874f5b8ff3d9ad421d970d2fa5","versionType":"git"},{"version":"fb27f198971a68fec59d5493b68e35e916fce62c","status":"affected","lessThan":"c5525a1021c76856fb0c4f9d0dddfeef25d72b9c","versionType":"git"},{"version":"fb27f198971a68fec59d5493b68e35e916fce62c","status":"affected","lessThan":"8cc513aa794d25cd6cf4dfe054eba600d4f813a5","versionType":"git"},{"version":"fb27f198971a68fec59d5493b68e35e916fce62c","status":"affected","lessThan":"8cbeaea4d325f0fc980736b44a06dd1a30e177ff","versionType":"git"},{"version":"fb27f198971a68fec59d5493b68e35e916fce62c","status":"affected","lessThan":"a5de200ac41bede9ef7f7f173e76f50fe6d5ca71","versionType":"git"},{"version":"fb27f198971a68fec59d5493b68e35e916fce62c","status":"affected","lessThan":"b9f34a95a81021fa1f3c9cb8cfd458e66824cad6","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/mtd/spi-nor/sfdp.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.11","versionType":"semver"},{"version":"5.15.226","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.193","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.117","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.63","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.4","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/mtd/spi-nor/sfdp.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/7d720359eeddb899cd551a08c153212eac836585"},{"url":"https://git.kernel.org/stable/c/4ab99807528307874f5b8ff3d9ad421d970d2fa5"},{"url":"https://git.kernel.org/stable/c/c5525a1021c76856fb0c4f9d0dddfeef25d72b9c"},{"url":"https://git.kernel.org/stable/c/8cc513aa794d25cd6cf4dfe054eba600d4f813a5"},{"url":"https://git.kernel.org/stable/c/8cbeaea4d325f0fc980736b44a06dd1a30e177ff"},{"url":"https://git.kernel.org/stable/c/a5de200ac41bede9ef7f7f173e76f50fe6d5ca71"},{"url":"https://git.kernel.org/stable/c/b9f34a95a81021fa1f3c9cb8cfd458e66824cad6"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:27:25.833Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.15.226"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"6.1.193"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"6.12.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"6.18.63"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"7.3.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}