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=1796046849; b=zTnZdNWQ/YTYZAom0XZbNrNrOovkiPAPHgvnX5dPv/DsO2khSetF+9IwFPDsDrsC65G4 OUhmv+fBWMNh3gzLXdw/r/9yvax53ck4wqQl2N7yGe6uZJG+MmefLIvgS8A19NjYvuD79 gqGDd2eZIY9udjhuJU82fUqjMjOiEuEQMOB+cLaDlxEqLm5OIoOLg0EOcm8sD3/54AQfG wkMQzyr7PJTPnjVx8rti5CCcW3WoxyUHThfv+c2I6wZjei+wd2zxAEZ8pSK5cN86k1WkB Cu7XTnriA4pe7EVBZAcNQ4F5yRK80elHA317Hr0KkgA3UCw2Y293LP1X4dKeDN0twGg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796046849; 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=qhPOlx7aPEh/MUv6WDCJSB/OY/56BCrN7f6JBAg+8kY=; b=HpLnJQw68TouAmTtXpOMYuxThZfMamFSU2wxeV+MIfgkSnPSmGzPKgcBAMYN5eHparSt /fatJ/+uD/RmHOSakpJc4nZUHSgL24POJIvS9LqfCuQSVeLvBLx5s+R6fLi2l58e9Ecqp ykJUBd7NPDHJGMwri/hb3VGZcpfaaHTEDEx8l2A1Z3RBs5+eUR8k27wGdhElpo5c9dSps bYUke42oBjXSneAqJLzeFUWqUjoiv54C7103M8LUwt2iWSOhJq+rm9vCLX5H24OEqGSId L0jafsJSaTYK5Y1FxXiLreid8Wv/Ue/oDxq9/6SKItxlG5rZvpaKqkklK4tmf3QJZPg== 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="hZ54/EvB"; 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 59F8A606A31C for ; Mon, 30 Nov 2026 13:54:09 +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=hZ54/EvB Received: by smtp.kernel.org (Postfix) with ESMTPSA id B05A61F000C1; Mon, 30 Nov 2026 13:54:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796046849; bh=qhPOlx7aPEh/MUv6WDCJSB/OY/56BCrN7f6JBAg+8kY=; h=From:To:Cc:Subject:Date:Reply-To; b=hZ54/EvBdr3ywNxKZfzgH/cAveAB67qC25tk+94O8sEtKlNYkLvlgm1UJWqCv8qBw QDO4ncpAaEMT2ctY/VjBbT90v6OaQADoc1cfC1SfePye008u1KmnLTZbSrygDFnYBu hCEiw3KAPKUQCKKPiLJcpa+kkFSI7brJ0MC20D1E= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-139052: mtd: spi-nor: sfdp: check the length of the SCCR map Date: Mon, 30 Nov 2026 14:29:17 +0100 Message-ID: <2026113003-CVE-2026-139052-241b@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=3306; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=8LUSLatRDcf4QloqIaM5X4QyTsstVogIkwWIVuAXZHo=; b=owGbwMvMwCRo6H6F97bub03G02pJDNm8ldkO89sz1GIvM/PZvtqiw2r28M/T0n2f9758//xfe 1u8bChXRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEyE2Z9hQZ8Jw9Wes30m96M6 DJV2KPmGrPmeybBg4YOQ1TG8q4UuX3xbUCMcNL2u400DAA== 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 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. The Linux kernel CVE team has assigned CVE-2026-139052 to this issue. Affected and fixed versions =========================== Issue introduced in 6.4 with commit 7ab8b810757a32b083c75a61b5638bca82e17a4c and fixed in 6.6.163 with commit b833b44e8b8c2f8e999eef2158982344e3cfcf30 Issue introduced in 6.4 with commit 7ab8b810757a32b083c75a61b5638bca82e17a4c and fixed in 6.12.117 with commit 2d03759ef4ad9c7294bb6f0b49eff71d6958e833 Issue introduced in 6.4 with commit 7ab8b810757a32b083c75a61b5638bca82e17a4c and fixed in 6.18.63 with commit 7317c31a54bb84decb5b25d1bc03b11e0f63af6a Issue introduced in 6.4 with commit 7ab8b810757a32b083c75a61b5638bca82e17a4c and fixed in 7.3.4 with commit db4a2da55ca42156acc2f53a5055f7282f2775d4 Issue introduced in 6.4 with commit 7ab8b810757a32b083c75a61b5638bca82e17a4c and fixed in 7.4-rc1 with commit 1413f38f37194673502e61cd3749e091c031370b 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-139052 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/b833b44e8b8c2f8e999eef2158982344e3cfcf30 https://git.kernel.org/stable/c/2d03759ef4ad9c7294bb6f0b49eff71d6958e833 https://git.kernel.org/stable/c/7317c31a54bb84decb5b25d1bc03b11e0f63af6a https://git.kernel.org/stable/c/db4a2da55ca42156acc2f53a5055f7282f2775d4 https://git.kernel.org/stable/c/1413f38f37194673502e61cd3749e091c031370b