Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98EF33CAA38 for ; Fri, 28 Aug 2026 06:55:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787900143; cv=none; b=krsRZPYMl4L8MYwAFpwadIT8adfIe92lMQ1GqIDx5lu2GFCZQRz4dNOAdjbwrGdzoj1tFd96VAow2mgPODh0w0cnRFGN8aNRX8ju3zleHddQtDIJKOIcTlHMdOoUsb3XwWETBer2cqZK6R3sZGOaucfQ0ISRFmQzKtxWDSRxaT8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787900143; c=relaxed/simple; bh=7tUj6qHCAaHYk7I5OHsfwjKEyBH8mX+x9kZ22a0O398=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=AjjAWEUmr98eGqOqLpZYQpUV903Fkr2/dRgQiXWNLHo0FhbDIR9KC2vDf82GiH7ZRz1wQwOblgyl/9ypFr4oW/EAwS9sdwBZA6jmOwJcEE+UgevhAPU0c8E+8WKqUIdcGmQfZp0zMae5L/NcfANF1aXHp8sWPQxYs13quibcqbU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zswSPOFN; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="zswSPOFN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2F561F000E9; Fri, 28 Aug 2026 06:55:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1787900142; bh=jl8wasMOYTVN4Y2Bz4q3OHGaouellIN3hTh2/I06yc4=; h=From:To:Cc:Subject:Date:Reply-To; b=zswSPOFNzS0CtfvFyNYQ7/YqfD+76wffrpiRoGlMZT34WKAIQIasET/lIWDsVx2Td OJyvgnnlOBM2toY6kg8+aAJKbJgPDhJxppieAaXEpOkEB8VHawNCb889IVEVXmeLYz ZyblIrLrpvsXjFZ7dVW+TtwUJsT4qOA5wCyh/sog= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-80712: spi: spi-qpic-snand: write the feature value before executing SET_FEATURE Date: Fri, 28 Aug 2026 08:53:35 +0200 Message-ID: <2026082808-CVE-2026-80712-e74e@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3804; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=6ppjL6QDkh+/yZr2v59wfWD5FTdRIqiKZRccMtNh8gw=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkTDUIbXgUGstkpSO1mzmbWXPRysmJW5PpSAT4dqcb+5 8c7H+t0xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwETMpRjmmX7uKPisrvry8N6/ H2OYlXauWrltN8OCBdcW82SlqBVpVc1nzJ19+X6Ig/BHAA== 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: spi: spi-qpic-snand: write the feature value before executing SET_FEATURE qcom_spi_send_cmdaddr() programs NAND_FLASH_CMD/NAND_EXEC_CMD and submits the descriptors, which makes the controller execute the command immediately. For SPINAND_SET_FEATURE the value to be written is only placed into NAND_FLASH_FEATURES afterwards, by qcom_spi_io_op(), in a second submission - so the chip is programmed with whatever that register happened to hold from a previous operation, and the intended value is only applied by the *next* SET_FEATURE. Measured on a TP-Link Archer AX55 v1 (IPQ5018, ESMT F50L1G41LB): writing 0x40 to the configuration register (0xb0) leaves the chip at 0x00, and the subsequent write of 0x00 leaves it at 0x40 - every write lands one operation late. This stayed unnoticed until v6.18 added SPI-NAND OTP support together with OTP entries for ESMT chips. spinand_otp_rw() enables OTP mode, reads, and disables it again, and mtd_otp_nvmem_add() does this during MTD registration. With the off-by-one, the "disable" write actually applies the previously requested value, so CFG_OTP_ENABLE ends up set: the chip stays in OTP mode, every subsequent array read returns the OTP area instead of the array (UBI reports an empty device) and all writes fail with -EIO because the OTP area is write protected. On this board that makes the whole flash unusable and the device unbootable. Write the feature value into NAND_FLASH_FEATURES as part of the same transaction, before NAND_EXEC_CMD. While at it, copy only the bytes the operation actually carries - the previous code dereferenced a 4-byte pointer on a one-byte buffer (spinand->scratchbuf). With this patch the flash contents read back bit-identical to a known-good dump of the same board taken under the vendor firmware (md5-verified across partitions), and writes work. The Linux kernel CVE team has assigned CVE-2026-80712 to this issue. Affected and fixed versions =========================== Issue introduced in 6.15 with commit 7304d1909080ef0c9da703500a97f46c98393fcd and fixed in 6.18.44 with commit 581e5166f0780103dc91c0d8ebc801f9af4824b0 Issue introduced in 6.15 with commit 7304d1909080ef0c9da703500a97f46c98393fcd and fixed in 7.1.8 with commit 3ba021079ef2ac6e21e3547328496ac42d22b56a Issue introduced in 6.15 with commit 7304d1909080ef0c9da703500a97f46c98393fcd and fixed in 7.2 with commit 8fd62901d6bf03f274a49dd0060793cc07dd51b0 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-80712 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/spi/spi-qpic-snand.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/581e5166f0780103dc91c0d8ebc801f9af4824b0 https://git.kernel.org/stable/c/3ba021079ef2ac6e21e3547328496ac42d22b56a https://git.kernel.org/stable/c/8fd62901d6bf03f274a49dd0060793cc07dd51b0