{"id":"CVE-2026-139360","state":"PUBLISHED","title":"spi: omap2-mcspi: handle DMA setup failures","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: omap2-mcspi: handle DMA setup failures\n\nThe DMA paths ignore failures from dmaengine_slave_config(), descriptor\npreparation and dmaengine_submit(), and carry FIXME comments about\nfalling back to PIO. A failed setup can leave a half-started transfer\nor wait for a completion that never arrives.\n\nCheck each step and clean up with dmaengine_terminate_sync() on error.\nPrepare both descriptors before issuing either channel. Fall back to\nPIO only for host-mode transfers that have a TX buffer, when no DMA has\nbeen started and cleanup succeeded. RX-only and target-mode transfers\nreturn the error instead, since the bus may already be clocking.\n\nThe FIFO is enabled before the DMA attempt, but the PIO path polls\nper-word TXS/RXS and does not expect FIFO mode. Disable the FIFO, with\nthe channel off while its bits change, before falling back.\n\nTested on an AM642 board with a TI 6.12.57 vendor kernel built with\nthis patch and booted from RAM. On a McSPI bus using DMA, 200\niterations of 4096-byte TX and 1024-byte RX spidev transfers completed\nwith no errors, timeouts or kernel warnings. With a temporary change\nthat fails every DMA-sized TX setup, 60 spidev writes fell back to PIO\nwith no errors or timeouts. That test used a bus with no device\nattached and did not show a difference with and without the FIFO\ndisable, which is based on reading the code.","publishedAt":"2026-11-30T13:34:02.397Z","updatedAt":"2026-11-30T13:34:02.397Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"53741ed8f0a3fc646576b6d7adf563f403ba6c03","status":"affected","lessThan":"945a413d47ac6565747b802ab35efb8ce668e099","versionType":"git"},{"version":"53741ed8f0a3fc646576b6d7adf563f403ba6c03","status":"affected","lessThan":"968589dd84df706f7671d94ecc719821c8f61729","versionType":"git"},{"version":"53741ed8f0a3fc646576b6d7adf563f403ba6c03","status":"affected","lessThan":"2edf2a5f293fb927f3a0b997d7f652770ca12ca7","versionType":"git"},{"version":"53741ed8f0a3fc646576b6d7adf563f403ba6c03","status":"affected","lessThan":"121e6311647d331f48e0baee5824293a7d1f53ba","versionType":"git"},{"version":"53741ed8f0a3fc646576b6d7adf563f403ba6c03","status":"affected","lessThan":"c126e07bde21c518f1356937ac240500d1bc81c0","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-omap2-mcspi.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.6","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","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-omap2-mcspi.c"]}],"references":["https://git.kernel.org/stable/c/945a413d47ac6565747b802ab35efb8ce668e099","https://git.kernel.org/stable/c/968589dd84df706f7671d94ecc719821c8f61729","https://git.kernel.org/stable/c/2edf2a5f293fb927f3a0b997d7f652770ca12ca7","https://git.kernel.org/stable/c/121e6311647d331f48e0baee5824293a7d1f53ba","https://git.kernel.org/stable/c/c126e07bde21c518f1356937ac240500d1bc81c0"],"weaknesses":[],"ingestedAt":"2026-11-30T13:48:04.491Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/139xxx/CVE-2026-139360.json","commit":"8c2c22940a0de21d18737df980299c0488d5dc73","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-139360","state":"PUBLISHED","datePublished":"2026-11-30T13:34:02.397Z","dateUpdated":"2026-11-30T13:34:02.397Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-11-30T13:22:15.929Z"},"containers":{"cna":{"title":"spi: omap2-mcspi: handle DMA setup failures","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nspi: omap2-mcspi: handle DMA setup failures\n\nThe DMA paths ignore failures from dmaengine_slave_config(), descriptor\npreparation and dmaengine_submit(), and carry FIXME comments about\nfalling back to PIO. A failed setup can leave a half-started transfer\nor wait for a completion that never arrives.\n\nCheck each step and clean up with dmaengine_terminate_sync() on error.\nPrepare both descriptors before issuing either channel. Fall back to\nPIO only for host-mode transfers that have a TX buffer, when no DMA has\nbeen started and cleanup succeeded. RX-only and target-mode transfers\nreturn the error instead, since the bus may already be clocking.\n\nThe FIFO is enabled before the DMA attempt, but the PIO path polls\nper-word TXS/RXS and does not expect FIFO mode. Disable the FIFO, with\nthe channel off while its bits change, before falling back.\n\nTested on an AM642 board with a TI 6.12.57 vendor kernel built with\nthis patch and booted from RAM. On a McSPI bus using DMA, 200\niterations of 4096-byte TX and 1024-byte RX spidev transfers completed\nwith no errors, timeouts or kernel warnings. With a temporary change\nthat fails every DMA-sized TX setup, 60 spidev writes fell back to PIO\nwith no errors or timeouts. That test used a bus with no device\nattached and did not show a difference with and without the FIFO\ndisable, which is based on reading the code."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"53741ed8f0a3fc646576b6d7adf563f403ba6c03","status":"affected","lessThan":"945a413d47ac6565747b802ab35efb8ce668e099","versionType":"git"},{"version":"53741ed8f0a3fc646576b6d7adf563f403ba6c03","status":"affected","lessThan":"968589dd84df706f7671d94ecc719821c8f61729","versionType":"git"},{"version":"53741ed8f0a3fc646576b6d7adf563f403ba6c03","status":"affected","lessThan":"2edf2a5f293fb927f3a0b997d7f652770ca12ca7","versionType":"git"},{"version":"53741ed8f0a3fc646576b6d7adf563f403ba6c03","status":"affected","lessThan":"121e6311647d331f48e0baee5824293a7d1f53ba","versionType":"git"},{"version":"53741ed8f0a3fc646576b6d7adf563f403ba6c03","status":"affected","lessThan":"c126e07bde21c518f1356937ac240500d1bc81c0","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/spi/spi-omap2-mcspi.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.6","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.6","versionType":"semver"},{"version":"6.6.163","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.119","status":"unaffected","lessThanOrEqual":"6.12.*","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-omap2-mcspi.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/945a413d47ac6565747b802ab35efb8ce668e099"},{"url":"https://git.kernel.org/stable/c/968589dd84df706f7671d94ecc719821c8f61729"},{"url":"https://git.kernel.org/stable/c/2edf2a5f293fb927f3a0b997d7f652770ca12ca7"},{"url":"https://git.kernel.org/stable/c/121e6311647d331f48e0baee5824293a7d1f53ba"},{"url":"https://git.kernel.org/stable/c/c126e07bde21c518f1356937ac240500d1bc81c0"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-11-30T13:34:02.397Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.6","versionEndExcluding":"6.6.163"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.6","versionEndExcluding":"6.12.119"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.6","versionEndExcluding":"6.18.65"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.6","versionEndExcluding":"7.3.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.6","versionEndExcluding":"7.4-rc1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}