CVE-2026-139397

spi: axi-spi-engine: fix stale SYNC IRQ pending

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

spi: axi-spi-engine: fix stale SYNC IRQ pending

spi_engine_setup() sends a SYNC(1) command and polls SYNC_ID to confirm
it was parsed by the FPGA, but never clears the corresponding interrupt
pending bit (INT_PENDING[SYNC]). When the first real SPI transfer starts
and INT_SYNC is enabled, that stale pending bit fires immediately, causing
the IRQ handler to see the leftover SYNC_ID 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 INT_PENDING[SYNC] after the polled SYNC, ensuring no
stale interrupt is left pending.

Analysis

AI-generated

Technical impact

A race condition in the Linux AXI SPI engine causes the SYNC interrupt pending bit to remain set after a polled SYNC command during spi_engine_setup(). When a real SPI transfer begins, the stale pending bit fires immediately and the interrupt handler processes the leftover SYNC_ID, matching it to the current transfer and signalling completion before the FPGA hardware has finished. This premature completion can lead to corrupted data or mis‑synchronised transfers within the system, potentially disrupting critical operations that rely on accurate SPI communication.

Affected Systems

The flaw exists in the Linux kernel’s AXI SPI engine driver. All kernel releases containing the driver before the commit that clears INT_PENDING[SYNC] are affected. Affected users include those deploying custom FPGA hardware that relies on the AXI SPI controller, especially at low SPI clock rates (~2‑3 MHz).

Risk and Exploitability

The vulnerability is local to the kernel and requires interaction with the SPI subsystem; it does not expose remote code execution. No EPSS score is available and the flaw is not listed in the CISA KEV. The CVSS score is not provided, but the exploitability is limited to environments that use low SPI clock rates and custom FPGA configurations. The risk therefore appears moderate, driven by the requirement to trigger the race condition through specific hardware timing. It would affect integrity of data transfers rather than confidentiality or availability of the host system.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version that includes the commit clearing INT_PENDING[SYNC] after the polled SYNC command.
  • After the kernel upgrade, test SPI transfers at low clock frequencies to ensure the interrupt no longer fires prematurely.
  • If a kernel upgrade cannot be performed immediately, avoid driving the AXI SPI controller at low clock rates (2‑3 MHz) until the patch is applied.

Generated by OpenCVE AI on November 30, 2026 at 21:54 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-368
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: spi: axi-spi-engine: fix stale SYNC IRQ pending spi_engine_setup() sends a SYNC(1) command and polls SYNC_ID to confirm it was parsed by the FPGA, but never clears the corresponding interrupt pending bit (INT_PENDING[SYNC]). When the first real SPI transfer starts and INT_SYNC is enabled, that stale pending bit fires immediately, causing the IRQ handler to see the leftover SYNC_ID 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 INT_PENDING[SYNC] after the polled SYNC, ensuring no stale interrupt is left pending.
Title spi: axi-spi-engine: fix stale SYNC IRQ pending
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-368

    Context Switching Race Condition

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:34 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM