From mboxrd@z Thu Jan 1 00:00:00 1970 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 737DB380FF4 for ; Sat, 15 Aug 2026 06:32:35 +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=1786775556; cv=none; b=CYIhjOUrg0TUMgxEpM9Y3xBziwGC0vsS2VawNfx7DdosZBX7u9k8gTCk/CbRCFag9aKY4gjUuvIJv2RiJ3uyGoc68+MtHkYIBekAjtHf/WTc4scQYytgenh5iqWbgyw9y+oiBLMFqoKYy9IpW9YtSDvRw0MxptqV2HVaFDPpcek= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786775556; c=relaxed/simple; bh=hUfa9AKMaGZ2hUXNV3h+wJNyxF0Pwc9V4onNOAen5RE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DYUuflDJubD79B6aWD+s3rA56rKfvfbCy8PqqfwYSFWfHjgi/J2jpmDItc7qHrV/ZDW9xPs7bk+mRX9QO0pbx33NyHLJJMGubfl4zesvdKqpvdLovpPkYHuD/gc1Vzwh4XkQUCo8Ns5su+LbYV4KsK2c5ljKtNcpneB2dL7wdCg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HZKMqKIn; 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="HZKMqKIn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C94C91F000E9; Sat, 15 Aug 2026 06:32:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1786775555; bh=1RFpdwodDOi9NG7I7EN6eWWx64YBTNEVXfBQm5UucSE=; h=From:To:Cc:Subject:Date:Reply-To; b=HZKMqKInRqHBIVeeX0+f/bEoWNRrkVSkvCBBhm89OpeepopyuzEEaI6C2u3htIrh+ jtEG2ZVHzB2GmgQrKgu7pQpQ5EL12zT1b7nhMGcr6aJrJdxwi9raJSGj6vGtiBWxbB asTiQhOteXhO/7ktuXj46pX+M0whZU/i5Cbl0mfY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-74276: spi: xilinx: use FIFO occupancy register to determine buffer size Date: Sat, 15 Aug 2026 15:10:03 +0900 Message-ID: <2026081545-CVE-2026-74276-da0a@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=4769; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=wHPJE5Q7upNic3uxFpUIxnt5qdc/Tj8Udh14RCX1VMs=; b=owGbwMvMwCRo6H6F97bub03G02pJDFkNjKz8BjcSX92tM72jaevkIiXovy3iKd+O7B0eHzyf3 fM//T69I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACaSW8kwP3b/hpade6t4bbs/ lMyYkHZMz+5pOMOCs/Xvz6xZKHHt5vKUuKnrBcrlXwYIAgA= 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: xilinx: use FIFO occupancy register to determine buffer size The method the driver uses to determine the size of the FIFO has a problem. What it currently does is this: It stops the SPI hardware and writes to the TX FIFO register until TX FIFO FULL asserts in the status register. But the hardware does not only have the FIFO, it also has a shift register which can hold a byte. This can be seen, when writing a byte to the FIFO (while the SPI hardware is stopped,) the TX FIFO EMPTY is still empty. So, if we have a FIFO size of 16 for example, the current method returns a 17. This is a problem, at least when using the driver in irq mode. The same size determined for the TX FIFO is also assumed for the RX FIFO. When a SPI transaction wants to write the amount of the FIFO size or more bytes, the following happens, for example with 16 bytes FIFO size: The driver stops the SPI hardware and writes 17 bytes to the TX FIFO and starts the SPI hardware and goes sleep. The hardware then shifts out 17 bytes (FIFO + shift register) and simultaneously reads bytes into the RX FIFO, but it only has 16 places, so it looses one byte. Then TX FIFO empty asserts, wakes the driver again, which has a fast path and reads 16 bytes from the RX FIFO, but before reading the last 17th byte (which is lost) it does this: sr = xspi->read_fn(xspi->regs + XSPI_SR_OFFSET); if (!(sr & XSPI_SR_RX_EMPTY_MASK)) { xilinx_spi_rx(xspi); rx_words--; } It reads the status register and checks if the RX FIFO is not empty. But it is empty in our case. So this check spins in a while loop forever locking the driver. This patch fixes the logic to determine the FIFO size. The Linux kernel CVE team has assigned CVE-2026-74276 to this issue. Affected and fixed versions =========================== Issue introduced in 4.0 with commit 4c9a761402d780b86b9b068aba4ef8e29ed15e99 and fixed in 5.10.261 with commit 4ee65558a7fda463222f5edc631b6d7862218725 Issue introduced in 4.0 with commit 4c9a761402d780b86b9b068aba4ef8e29ed15e99 and fixed in 5.15.212 with commit e98f589d54068dfcc7da42d9b730e47b84e2991a Issue introduced in 4.0 with commit 4c9a761402d780b86b9b068aba4ef8e29ed15e99 and fixed in 6.1.178 with commit 1fc6a6c0cc7796b0c1cf4eec3f0720f422f09273 Issue introduced in 4.0 with commit 4c9a761402d780b86b9b068aba4ef8e29ed15e99 and fixed in 6.6.145 with commit dfab0d4698a642bab9b895e2e6d240838cfe2cc6 Issue introduced in 4.0 with commit 4c9a761402d780b86b9b068aba4ef8e29ed15e99 and fixed in 6.12.97 with commit d7ccd8736b67550eca746ed7fa39a36016ff114b Issue introduced in 4.0 with commit 4c9a761402d780b86b9b068aba4ef8e29ed15e99 and fixed in 6.18.40 with commit 1c9246a199e19b2fd36e94feed60e55f27103a4f Issue introduced in 4.0 with commit 4c9a761402d780b86b9b068aba4ef8e29ed15e99 and fixed in 7.1.5 with commit d1944b71c18e7494756bff1a6f80c25be99eaecb Issue introduced in 4.0 with commit 4c9a761402d780b86b9b068aba4ef8e29ed15e99 and fixed in 7.2-rc1 with commit 47f3b5365536e8c38f264824ab15fdb74454e066 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-74276 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-xilinx.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/4ee65558a7fda463222f5edc631b6d7862218725 https://git.kernel.org/stable/c/e98f589d54068dfcc7da42d9b730e47b84e2991a https://git.kernel.org/stable/c/1fc6a6c0cc7796b0c1cf4eec3f0720f422f09273 https://git.kernel.org/stable/c/dfab0d4698a642bab9b895e2e6d240838cfe2cc6 https://git.kernel.org/stable/c/d7ccd8736b67550eca746ed7fa39a36016ff114b https://git.kernel.org/stable/c/1c9246a199e19b2fd36e94feed60e55f27103a4f https://git.kernel.org/stable/c/d1944b71c18e7494756bff1a6f80c25be99eaecb https://git.kernel.org/stable/c/47f3b5365536e8c38f264824ab15fdb74454e066