spi: xilinx: use FIFO occupancy register to determine buffer size
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--
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 5.10.261, 5.15.212, 6.1.178, 6.12.97, 6.18.40, 6.6.145, 7.1.5
- CVEs
- CVE-2026-74276
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 7 Nov 2026, 04:35 UTC · Revision 1
Source evidence
spi: xilinx: use FIFO occupancy register to determine buffer size
core-osv · Original sourcePublished 15 Aug 2026, 05:57 UTC
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--
osv:CVE-2026-74276
Kernel
Fixed versions: 5.10.261, 5.15.212, 6.1.178, 6.6.145, 6.12.97, 6.18.40, 7.1.5
Complete source record
{
"id": "b9dd26b6cb059cd5f771c75244353afdfa59146a4659ed75bc7e16de53640a5e",
"url": "https://osv.dev/vulnerability/CVE-2026-74276",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "spi: xilinx: use FIFO occupancy register to determine buffer size",
"summary": "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--",
"evidence": "osv:CVE-2026-74276",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "5.10.261",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.212",
"evidence": "/affected/1/ranges"
},
{
"value": "6.1.178",
"evidence": "/affected/1/ranges"
},
{
"value": "6.6.145",
"evidence": "/affected/1/ranges"
},
{
"value": "6.12.97",
"evidence": "/affected/1/ranges"
},
{
"value": "6.18.40",
"evidence": "/affected/1/ranges"
},
{
"value": "7.1.5",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2026-74276",
"aliases": [
"CVE-2026-74276"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "4c9a761402d780b86b9b068aba4ef8e29ed15e99"
},
{
"fixed": "4ee65558a7fda463222f5edc631b6d7862218725"
},
{
"fixed": "e98f589d54068dfcc7da42d9b730e47b84e2991a"
},
{
"fixed": "1fc6a6c0cc7796b0c1cf4eec3f0720f422f09273"
},
{
"fixed": "dfab0d4698a642bab9b895e2e6d240838cfe2cc6"
},
{
"fixed": "d7ccd8736b67550eca746ed7fa39a36016ff114b"
},
{
"fixed": "1c9246a199e19b2fd36e94feed60e55f27103a4f"
},
{
"fixed": "d1944b71c18e7494756bff1a6f80c25be99eaecb"
},
{
"fixed": "47f3b5365536e8c38f264824ab15fdb74454e066"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-74276.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.0.0"
},
{
"fixed": "5.10.261"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.212"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "6.1.178"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.2.0"
},
{
"fixed": "6.6.145"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.7.0"
},
{
"fixed": "6.12.97"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.13.0"
},
{
"fixed": "6.18.40"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "6.19.0"
},
{
"fixed": "7.1.5"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-74276.json"
}
}
],
"modified": "2026-10-28T02:30:50.072422883Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/1c9246a199e19b2fd36e94feed60e55f27103a4f",
"https://git.kernel.org/stable/c/1fc6a6c0cc7796b0c1cf4eec3f0720f422f09273",
"https://git.kernel.org/stable/c/47f3b5365536e8c38f264824ab15fdb74454e066",
"https://git.kernel.org/stable/c/4ee65558a7fda463222f5edc631b6d7862218725",
"https://git.kernel.org/stable/c/d1944b71c18e7494756bff1a6f80c25be99eaecb",
"https://git.kernel.org/stable/c/d7ccd8736b67550eca746ed7fa39a36016ff114b",
"https://git.kernel.org/stable/c/dfab0d4698a642bab9b895e2e6d240838cfe2cc6",
"https://git.kernel.org/stable/c/e98f589d54068dfcc7da42d9b730e47b84e2991a",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/74xxx/CVE-2026-74276.json",
"https://nvd.nist.gov/vuln/detail/CVE-2026-74276",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/74xxx/CVE-2026-74276.json"
}
},
"related_cves": [
{
"value": "CVE-2026-74276",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 518178,
"published_at": "2026-08-15T05:57:48.115+00:00"
}