spi: fsl-lpspi: terminate the RX channel on TX prepare failure path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 09c04466ce7ea494993c0635ba5edb6d2222a806 · < 808033d80d5c9f8adf7e8de9317389270ce13430| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
spi: fsl-lpspi: terminate the RX channel on TX prepare failure path
When dmaengine_prep_slave_sg() fails for the TX channel, the error path terminates the TX DMA channel but leaves the RX channel running. Since the RX channel was already submitted and issued prior to preparing the TX descriptor, returning -EINVAL causes the SPI core to unmap the DMA buffers while the RX DMA engine continues writing to them, leading to potential memory corruption or use-after-free.
Terminate the RX channel before returning on the TX prepare failure path.
From the CVE record · Linux
The Linux kernel’s fsl-lpspi driver leaves the RX DMA channel running if TX DMA descriptor preparation fails. The SPI core then unmaps buffers that RX DMA may still write to, potentially causing memory corruption or use-after-free. The input does not specify how an attacker could trigger this condition or whether access or user interaction is required.
Operators running the Linux kernel should check whether their kernel includes the affected fsl-lpspi driver; affected versions are not specified.