spi: Fix DMA mapping ownership on partial map failure
Affects Linux kernel SPI DMA transfers in 6.11 through 6.12.109, 6.13 through 6.18.50, and 6.19 through 7.2.4. Fixed in 6.12.110, 6.18.51 and 7.2.5.
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- How many real-world setups can hit the bug, from the vendor's advisory and CISA data. It does not know your setup.What do these mean? →
- Unclear
- Fix
- Fixed in 6.12.110, 6.18.51, 7.2.5
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
The vulnerability affects the Linux kernel's SPI (Serial Peripheral Interface) subsystem, specifically its DMA buffer mapping logic used when transferring messages to SPI devices. When a mapping step fails partway through, the kernel can unmap memory using a null or stale device pointer, which may crash the system (kernel oops) or leave DMA mappings improperly released.
Summarized by anthropic/claude-haiku-5.5. Verify details against the original sources.
Read the original description
In the Linux kernel, the following vulnerability has been resolved: spi: Fix DMA mapping ownership on partial map failure If RX mapping fails after TX mapping succeeds, __spi_map_msg() unmaps TX but leaves tx_sg_mapped set. If TX mapping fails on a later transfer, mappings created for earlier transfers remain active. In both cases, cur_{tx,rx}_dma_dev have not yet been updated because they are assigned only after every transfer has been mapped. The subsequent spi_unmap_msg() may therefore unmap the TX mapping again or release earlier mappings using a NULL or stale device. Using a NULL device can trigger an oops. An empty SG table does not prevent the NULL dereference because dma_unmap_sg_attrs() accesses the device before checking the entry count. Publish both mapping devices before mapping starts and unwind all failures through __spi_unmap_msg(). This clears the mapping flags and releases each mapping once with the device that created it. Publishing the devices before the loop also refreshes them when no transfer needs mapping. No mapping flag is set in that case, so current users do not use the pointers as mapping owners.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From e289df82344fecc104ad8326b9ab6da612b9c899 · fixed in cc8354213ad6bd5fb8cc05a3fa3701188d086626; From e289df82344fecc104ad8326b9ab6da612b9c899 · fixed in a38051fa2ddedbc8ec15292c55e276880ec5b9a4; From e289df82344fecc104ad8326b9ab6da612b9c899 · fixed in 5def8b6aaad44603740786262b95b6f77df52a1c; From e289df82344fecc104ad8326b9ab6da612b9c899 · fixed in 367cea239fc93094e5c16a72724800e0358f5c46
- Linux Linux
6.11
- KernelLinux
From 6.11.0 · fixed in 6.12.110; From 6.13.0 · fixed in 6.18.51; From 6.19.0 · fixed in 7.2.5
References 4
Questions about CVE-2026-90012
What does this mean?
When DMA mapping of an SPI message fails partway through, the cleanup can unmap buffers using a NULL or stale device. This can trigger a kernel oops (crash).Source: git.kernel.org
Am I affected, and how do I check?
Kernels from 6.11.0 up to but not including 6.12.110, from 6.13.0 up to but not including 6.18.51, and from 6.19.0 up to but not including 7.2.5. To check a system, compare the output of uname -r against these ranges. The bug only matters when an SPI DMA mapping fails partway through.Source: git.kernel.org
What should I do about it?
Update to 6.12.110, 6.18.51, 7.2.5, or a later release in the same series.Source: git.kernel.org
Is it being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.Source: cve.now feed data