CVE-2026-90012: spi: Fix DMA mapping ownership on partial map failure

Published Sep 16, 2026
·
Updated

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, spimapmsg() unmaps TX but leaves txsgmapped set. If TX mapping fails on a later transfer, mappings created for earlier transfers remain active.

In both cases, cur{tx,rx}dmadev have not yet been updated because they are assigned only after every transfer has been mapped. The subsequent spiunmapmsg() 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 dmaunmapsgattrs() accesses the device before checking the entry count.

Publish both mapping devices before mapping starts and unwind all failures through spiunmapmsg(). 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.

Event History

Sep 16, 2026
CVE Published
via MITRE·10:33 AM
Data Sourced
via MITRE·10:33 AM
Description

Frequently Asked Questions

1

What runtime conditions can lead to incorrect DMA cleanup?

The problematic paths occur when RX DMA mapping fails after TX mapping has succeeded, or when TX mapping fails on a later transfer after earlier transfers were mapped. In these cases, cleanup can use mapping state or device pointers that do not correctly reflect the mappings created.

2

What is the practical impact of the faulty cleanup?

A TX mapping may be unmapped twice, or earlier mappings may be released using a NULL or stale DMA device. Using a NULL device can trigger a kernel oops, including when the scatter-gather table is empty because the DMA unmap routine accesses the device before checking the entry count.

3

Are transfers that do not require DMA mapping affected by mapping ownership flags?

No mapping flag is set when no transfer requires mapping, so current users do not use the published device pointers as mapping owners in that case. The fix still refreshes the device pointers before mapping begins.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203