{"id":"CVE-2026-139397","state":"PUBLISHED","title":"spi: axi-spi-engine: fix stale SYNC IRQ pending","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: axi-spi-engine: fix stale SYNC IRQ pending\n\nspi_engine_setup() sends a SYNC(1) command and polls SYNC_ID to confirm\nit was parsed by the FPGA, but never clears the corresponding interrupt\npending bit (INT_PENDING[SYNC]). When the first real SPI transfer starts\nand INT_SYNC is enabled, that stale pending bit fires immediately, causing\nthe IRQ handler to see the leftover SYNC_ID from setup, match it against\nthe current transfer's ID, and prematurely signal completion before the\nhardware finishes.\n\nThis race manifests at low SPI clock frequencies (~2-3 MHz), where the\nFPGA takes long enough to execute the transfer that handler is parsed\nbefore it finishes. At higher SCLK rates the transfer completes fast\nenough that the issue is masked.\n\nFix this by clearing INT_PENDING[SYNC] after the polled SYNC, ensuring no\nstale interrupt is left pending.","publishedAt":"2026-11-30T13:34:22.745Z","updatedAt":"2026-11-30T13:34:22.745Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1d0ee0c9df31c9fd1e4f8d7e2464e36fbf6e3f75","status":"affected","lessThan":"b68cb3650ceb87032ae28f571fe4336527b9a879","versionType":"git"},{"version":"1d0ee0c9df31c9fd1e4f8d7e2464e36fbf6e3f75","status":"affected","lessThan":"4aa253c9606afcd4eb4380436925b3d3d3c7cc13","versionType":"git"},{"version":"1d0ee0c9df31c9fd1e4f8d7e2464e36fbf6e3f75","status":"affected","lessThan":"ea29c686f96adcb505071ef228ba8047dc951fac","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-axi-spi-engine.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.16","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-axi-spi-engine.c"]}],"references":["https://git.kernel.org/stable/c/b68cb3650ceb87032ae28f571fe4336527b9a879","https://git.kernel.org/stable/c/4aa253c9606afcd4eb4380436925b3d3d3c7cc13","https://git.kernel.org/stable/c/ea29c686f96adcb505071ef228ba8047dc951fac"],"weaknesses":[],"ingestedAt":"2026-11-30T13:48:04.491Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139397.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139397","state":"PUBLISHED","datePublished":"2026-11-30T13:34:22.745Z","dateUpdated":"2026-11-30T13:34:22.745Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.931Z"},"containers":{"cna":{"title":"spi: axi-spi-engine: fix stale SYNC IRQ pending","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: axi-spi-engine: fix stale SYNC IRQ pending\n\nspi_engine_setup() sends a SYNC(1) command and polls SYNC_ID to confirm\nit was parsed by the FPGA, but never clears the corresponding interrupt\npending bit (INT_PENDING[SYNC]). When the first real SPI transfer starts\nand INT_SYNC is enabled, that stale pending bit fires immediately, causing\nthe IRQ handler to see the leftover SYNC_ID from setup, match it against\nthe current transfer's ID, and prematurely signal completion before the\nhardware finishes.\n\nThis race manifests at low SPI clock frequencies (~2-3 MHz), where the\nFPGA takes long enough to execute the transfer that handler is parsed\nbefore it finishes. At higher SCLK rates the transfer completes fast\nenough that the issue is masked.\n\nFix this by clearing INT_PENDING[SYNC] after the polled SYNC, ensuring no\nstale interrupt is left pending."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1d0ee0c9df31c9fd1e4f8d7e2464e36fbf6e3f75","status":"affected","lessThan":"b68cb3650ceb87032ae28f571fe4336527b9a879","versionType":"git"},{"version":"1d0ee0c9df31c9fd1e4f8d7e2464e36fbf6e3f75","status":"affected","lessThan":"4aa253c9606afcd4eb4380436925b3d3d3c7cc13","versionType":"git"},{"version":"1d0ee0c9df31c9fd1e4f8d7e2464e36fbf6e3f75","status":"affected","lessThan":"ea29c686f96adcb505071ef228ba8047dc951fac","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-axi-spi-engine.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.16","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.16","versionType":"semver"},{"version":"6.18.65","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.3.6","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-axi-spi-engine.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/b68cb3650ceb87032ae28f571fe4336527b9a879"},{"url":"https://git.kernel.org/stable/c/4aa253c9606afcd4eb4380436925b3d3d3c7cc13"},{"url":"https://git.kernel.org/stable/c/ea29c686f96adcb505071ef228ba8047dc951fac"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:34:22.745Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.16","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}