spi: xilinx: use FIFO occupancy register to determine buffer size

Summary

CVECVE-2026-74276
StatePUBLISHED
AssignerLinux
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-08-15 06:22:26 UTC
Updated2026-08-17 06:19:21 UTC
DescriptionIn 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.

Risk And Classification

EPSS: 0.001760000 probability, percentile 0.074660000 (date 2026-08-17)

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Linux Linux affected 4c9a761402d780b86b9b068aba4ef8e29ed15e99 4ee65558a7fda463222f5edc631b6d7862218725 git Not specified
CNA Linux Linux affected 4c9a761402d780b86b9b068aba4ef8e29ed15e99 e98f589d54068dfcc7da42d9b730e47b84e2991a git Not specified
CNA Linux Linux affected 4c9a761402d780b86b9b068aba4ef8e29ed15e99 1fc6a6c0cc7796b0c1cf4eec3f0720f422f09273 git Not specified
CNA Linux Linux affected 4c9a761402d780b86b9b068aba4ef8e29ed15e99 dfab0d4698a642bab9b895e2e6d240838cfe2cc6 git Not specified
CNA Linux Linux affected 4c9a761402d780b86b9b068aba4ef8e29ed15e99 d7ccd8736b67550eca746ed7fa39a36016ff114b git Not specified
CNA Linux Linux affected 4c9a761402d780b86b9b068aba4ef8e29ed15e99 1c9246a199e19b2fd36e94feed60e55f27103a4f git Not specified
CNA Linux Linux affected 4c9a761402d780b86b9b068aba4ef8e29ed15e99 d1944b71c18e7494756bff1a6f80c25be99eaecb git Not specified
CNA Linux Linux affected 4c9a761402d780b86b9b068aba4ef8e29ed15e99 47f3b5365536e8c38f264824ab15fdb74454e066 git Not specified
CNA Linux Linux affected 4.0 Not specified
CNA Linux Linux unaffected 4.0 semver Not specified
CNA Linux Linux unaffected 5.10.261 5.10.* semver Not specified
CNA Linux Linux unaffected 5.15.212 5.15.* semver Not specified
CNA Linux Linux unaffected 6.1.178 6.1.* semver Not specified
CNA Linux Linux unaffected 6.6.145 6.6.* semver Not specified
CNA Linux Linux unaffected 6.12.97 6.12.* semver Not specified
CNA Linux Linux unaffected 6.18.40 6.18.* semver Not specified
CNA Linux Linux unaffected 7.1.5 7.1.* semver Not specified
CNA Linux Linux unaffected 7.2 * original_commit_for_fix Not specified

References

ReferenceSourceLinkTags
git.kernel.org/stable/c/d1944b71c18e7494756bff1a6f80c25be99eaecb 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/47f3b5365536e8c38f264824ab15fdb74454e066 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/e98f589d54068dfcc7da42d9b730e47b84e2991a 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/dfab0d4698a642bab9b895e2e6d240838cfe2cc6 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/d7ccd8736b67550eca746ed7fa39a36016ff114b 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/1c9246a199e19b2fd36e94feed60e55f27103a4f 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/4ee65558a7fda463222f5edc631b6d7862218725 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
git.kernel.org/stable/c/1fc6a6c0cc7796b0c1cf4eec3f0720f422f09273 416baaa9-dc9f-4396-8d5f-8c081fb06d67 git.kernel.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report