CVE-2026-139397: spi: axi-spi-engine: fix stale SYNC IRQ pending
In the Linux kernel, the following vulnerability has been resolved:
spi: axi-spi-engine: fix stale SYNC IRQ pending
spienginesetup() sends a SYNC(1) command and polls SYNCID to confirm it was parsed by the FPGA, but never clears the corresponding interrupt pending bit (INTPENDING[SYNC]). When the first real SPI transfer starts and INTSYNC is enabled, that stale pending bit fires immediately, causing the IRQ handler to see the leftover SYNCID from setup, match it against the current transfer's ID, and prematurely signal completion before the hardware finishes.
This race manifests at low SPI clock frequencies (~2-3 MHz), where the FPGA takes long enough to execute the transfer that handler is parsed before it finishes. At higher SCLK rates the transfer completes fast enough that the issue is masked.
Fix this by clearing INTPENDING[SYNC] after the polled SYNC, ensuring no stale interrupt is left pending.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Clear INT_PENDING[SYNC] after spi_engine_setup() polls SYNC_ID to confirm the SYNC command.
Linux kernel spi: axi-spi-engine INT_PENDING[SYNC] = cleared after the polled SYNC