CVE-2026-90012
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
16/09/2026
Last modified:
19/10/2026
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
spi: Fix DMA mapping ownership on partial map failure<br />
<br />
If RX mapping fails after TX mapping succeeds, __spi_map_msg() unmaps<br />
TX but leaves tx_sg_mapped set. If TX mapping fails on a later<br />
transfer, mappings created for earlier transfers remain active.<br />
<br />
In both cases, cur_{tx,rx}_dma_dev have not yet been updated because they<br />
are assigned only after every transfer has been mapped. The subsequent<br />
spi_unmap_msg() may therefore unmap the TX mapping again or release<br />
earlier mappings using a NULL or stale device. Using a NULL device can<br />
trigger an oops. An empty SG table does not prevent the NULL dereference<br />
because dma_unmap_sg_attrs() accesses the device before checking the<br />
entry count.<br />
<br />
Publish both mapping devices before mapping starts and unwind all<br />
failures through __spi_unmap_msg(). This clears the mapping flags and<br />
releases each mapping once with the device that created it.<br />
<br />
Publishing the devices before the loop also refreshes them when no<br />
transfer needs mapping. No mapping flag is set in that case, so current<br />
users do not use the pointers as mapping owners.
Impact
Base Score 3.x
9.80
Severity 3.x
CRITICAL


