From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796046852; b=f0sHqSDPXSjG3UwhQJLuV7g6QwfAN7PkYL/gmjbM5qRFc7Fn/izAvGtAVJe5cNuu1iq8 L7LkMnfAidZev8DvPTk89CLOP4FykkULtyTbyLU3TGL200yov8kDLSSP/n8S8Y3DG1Un3 wP9WhXBUxMxsHmdc1cL52SvBbqRTiVum12QnAWoqlo5CKD3ODg4at39951/ZwybtbdpOH gEG4vwnpxn6jGXptk7xvYyppN4xJ2G8Imp7ximb2KNDMBYKjbbOP0hy7Yl+eRGag+lJV0 0Kh25lq7iVPAFBSYkuzuFsPqQVXUMaFyXw/IFMfzehO3+2KAHx66Mz4dB36ovLPWcLQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796046852; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=Wxrmm9L8l21qgL2ttMamj6K5pRmtLjjpt4Fj9AhsK1w=; b=zyuu04dqvwB929C48AGCHzM33NSH8WbcZMIZJx8Lu95MUvxWmRhre6R+9U8Lh80wz28I PJTK0gIPUyMWaFjAfVjInudNhf59Qj0FNfZz+B45M0pAldPeXmyIXDRZmllTkJriyHCl7 aNDpFg8GmwvgGiXU+g/CzQr9jIOX6rzVqNdOdyphsvwL39VMAWQRElmULGZPUEKDEaQc1 q12ibXbMnqIuJca+Yg0FPhiK8ET02qRwUhxszaIVeMz5cZnfjSDkDDjITbPetrX0Bsi9G Jc9JwhStNRwzKVrmqFEqfPbw4RjtPYPeH7DdWGkCvj8xBvBcRl4yhVQnzhSgktI6QFQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=Es7eDaTU; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 569CB606A31C for ; Mon, 30 Nov 2026 13:54:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=Es7eDaTU Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C9E91F00896; Mon, 30 Nov 2026 13:54:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796046852; bh=Wxrmm9L8l21qgL2ttMamj6K5pRmtLjjpt4Fj9AhsK1w=; h=From:To:Cc:Subject:Date:Reply-To; b=Es7eDaTUaoTWj/Or8r+Nqqq9l+6ltjJlwhPfnlJGAnd0icry8FeyRl/w0MowTsffF x7JJkXEhH5H7ibumckqW6NjTvuw2r4vu+0yIrD/kQxD7eMiYgjKmmaLxwT1tReKJzi 4hdldHAlNaGlExgkqgjN+PQUYQ94ttY1Yox8F6Wc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-139053: mtd: spi-nor: sfdp: check the length of the xSPI Profile 1.0 table Date: Mon, 30 Nov 2026 14:29:18 +0100 Message-ID: <2026113003-CVE-2026-139053-b1ca@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3744; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=3CmTE1UKV8usT2CTcfYA0xjC/7BJI9i0DbhXkp8mMAQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDNm8ldmvdpzealetsUl3x81tv3YHpSTVd/Ht5I3nLznz3 0+seZ1mRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEwkI5lhQcfiiIQt13cEdF0y 0wjIe3dZcLEGF8OCLmEG413eifPrGRyfvpuVrjYp9+YbAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman 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