spi: amlogic: spifc-a4: Fix DMA mapping error handling
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.196.19.97.0In the Linux kernel, the following vulnerability has been resolved:
spi: amlogic: spifc-a4: Fix DMA mapping error handling
Fix three bugs in aml_sfc_dma_buffer_setup() error paths: 1. Unnecessary goto: When the first DMA mapping (sfc->daddr) fails, nothing needs cleanup. Use direct return instead of goto. 2. Double-unmap bug: When info DMA mapping failed, the code would unmap sfc->daddr inline, then fall through to out_map_data which would unmap it again, causing a double-unmap. 3. Wrong unmap size: The out_map_info label used datalen instead of infolen when unmapping sfc->iaddr, which could lead to incorrect DMA sync behavior.
From the CVE record · Linux
The Linux kernel’s Amlogic spifc-a4 driver has errors in its DMA mapping failure paths, including a double-unmap and an incorrect unmap size. These errors can occur when DMA mapping fails; the input does not establish how an attacker could trigger them or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with the Amlogic spifc-a4 driver should check their kernel version; affected versions are not specified.