CVE-2025-40356: spi: rockchip-sfc: Fix DMA-API usage
In the Linux kernel, the following vulnerability has been resolved:
spi: rockchip-sfc: Fix DMA-API usage
Use DMA-API dmamapsingle() call for getting the DMA address of the transfer buffer instead of hacking with virttophys().
This fixes the following DMA-API debug warning: ------------[ cut here ]------------ DMA-API: rockchip-sfc fe300000.spi: device driver tries to sync DMA memory it has not allocated [device address=0x000000000cf70000] [size=288 bytes] WARNING: kernel/dma/debug.c:1106 at checksync+0x1d8/0x690, CPU#2: systemd-udevd/151 Modules linked in: ... Hardware name: Hardkernel ODROID-M1 (DT) pstate: 604000c9 (nZCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : checksync+0x1d8/0x690 lr : checksync+0x1d8/0x690 .. Call trace: checksync+0x1d8/0x690 (P) debugdmasyncsingleforcpu+0x84/0x8c dmasyncsingleforcpu+0x88/0x234 rockchipsfcexecmemop+0x4a0/0x798 [spirockchipsfc] spimemexecop+0x408/0x498 spinorreaddata+0x170/0x184 spinorreadsfdp+0x74/0xe4 spinorparsesfdp+0x120/0x11f0 spinorsfdpinitparamsdeprecated+0x3c/0x8c spinorscan+0x690/0xf88 spinorprobe+0xe4/0x304 spimemprobe+0x6c/0xa8 spiprobe+0x94/0xd4 reallyprobe+0xbc/0x298 ...
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
ubuntu/linux-aws-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1007.7~24.04.1 - Upgrade
Upgrade
ubuntu/linux-gcp-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1008.8~24.04.1 - Upgrade
Upgrade
ubuntu/linux-nvidia-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1008.8 - Upgrade
Upgrade
ubuntu/linux-oem-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1011.11 - Upgrade
Upgrade
ubuntu/linux-oracle-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1007.7~24.04.1 - Upgrade
Upgrade
ubuntu/linux-realtime-6.17to a version that resolves this vulnerability.Fixed in 6.17.0-1006.7~24.04.1 - Upgrade
Upgrade
ubuntu/linuxto a version that resolves this vulnerability.Fixed in 6.17.0-14.14 - Upgrade
Upgrade
ubuntu/linux-awsto a version that resolves this vulnerability.Fixed in 6.17.0-1007.7 - Upgrade
Upgrade
ubuntu/linux-azureto a version that resolves this vulnerability.Fixed in 6.17.0-1008.8 - Upgrade
Upgrade
ubuntu/linux-gcpto a version that resolves this vulnerability.Fixed in 6.17.0-1007.7 - Upgrade
Upgrade
ubuntu/linux-oracleto a version that resolves this vulnerability.Fixed in 6.17.0-1007.7 - Upgrade
Upgrade
ubuntu/linux-raspito a version that resolves this vulnerability.Fixed in 6.17.0-1008.8 - Upgrade
Upgrade
ubuntu/linux-realtimeto a version that resolves this vulnerability.Fixed in 6.17.0-1006.7 - Upgrade
Upgrade
ubuntu/linux-riscvto a version that resolves this vulnerability.Fixed in 6.17.0-14.14.1 - Compensating control
Modify the Rockchip SFC driver to use the DMA-API dma_map_single() call to obtain the DMA address of the transfer buffer instead of using virt_to_phys().
Event History
Frequently Asked Questions
What is the severity of CVE-2025-40356?
CVE-2025-40356 has a medium severity rating due to its potential impacts on system performance related to DMA-API usage.
How do I fix CVE-2025-40356?
To fix CVE-2025-40356, ensure that your Linux kernel version is updated to the latest stable release that includes the patch for this vulnerability.
What systems are affected by CVE-2025-40356?
CVE-2025-40356 affects systems running the vulnerable versions of the Linux kernel, particularly those utilizing the rockchip-sfc SPI driver.
Is CVE-2025-40356 being actively exploited?
As of now, there is no public indication that CVE-2025-40356 is being actively exploited in the wild.
What are the implications of CVE-2025-40356?
The implications of CVE-2025-40356 primarily involve potential instability in DMA operations, which could impact system performance.