9.8

CVE-2026-90012

spi: Fix DMA mapping ownership on partial map failure

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.
Daten sind bereitgestellt durch das CVE Programm von einer CVE Numbering Authority (CNA) (Unstrukturiert).
HerstellerLinux
≫
Produkt Linux
Default Statusunaffected
Version e289df82344fecc104ad8326b9ab6da612b9c899
Version < cc8354213ad6bd5fb8cc05a3fa3701188d086626
Status affected
Version e289df82344fecc104ad8326b9ab6da612b9c899
Version < a38051fa2ddedbc8ec15292c55e276880ec5b9a4
Status affected
Version e289df82344fecc104ad8326b9ab6da612b9c899
Version < 5def8b6aaad44603740786262b95b6f77df52a1c
Status affected
Version e289df82344fecc104ad8326b9ab6da612b9c899
Version < 367cea239fc93094e5c16a72724800e0358f5c46
Status affected
HerstellerLinux
≫
Produkt Linux
Default Statusaffected
Version 6.11
Status affected
Version 0
Version < 6.11
Status unaffected
Version <= 6.12.*
Version 6.12.110
Status unaffected
Version <= 6.18.*
Version 6.18.51
Status unaffected
Version <= 7.2.*
Version 7.2.5
Status unaffected
Version <= *
Version 7.3-rc1
Status unaffected
VulnDex Vulnerability Enrichment
Diese Information steht angemeldeten Benutzern zur Verfügung. Login Login
Zu dieser CVE wurde keine Warnung gefunden.
EPSS Metriken
Typ Quelle Score Percentile
EPSS FIRST.org 0.63% 0.486
CVSS Metriken
Quelle Base Score Exploit Score Impact Score Vector String
416baaa9-dc9f-4396-8d5f-8c081fb06d67 9.8 3.9 5.9
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Es wurden noch keine Informationen zu CWE veröffentlicht.
https://git.kernel.org/stable/c/cc8354213ad6bd5fb8cc05a3fa3701188d086626
https://git.kernel.org/stable/c/a38051fa2ddedbc8ec15292c55e276880ec5b9a4
https://git.kernel.org/stable/c/5def8b6aaad44603740786262b95b6f77df52a1c
https://git.kernel.org/stable/c/367cea239fc93094e5c16a72724800e0358f5c46