spi: ti-qspi: fix use-after-free after DMA setup failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c687c46e9e4527c4b4d82bc3cca58c1b08bcfb83 · < d7a076fb596c7b408ed6df74793a597990a6d860| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
spi: ti-qspi: fix use-after-free after DMA setup failure
The driver falls back to PIO mode if DMA setup fails during probe.
Make sure to clear the DMA channel pointer also if buffer allocation fails to avoid passing a pointer to the released channel to the DMA engine (or trying to free the channel a second time on late probe errors or driver unbind).
This issue was flagged by Sashiko when reviewing a devres allocation conversion patch.
From the CVE record · Linux
The Linux kernel ti-qspi driver can retain a pointer to a released DMA channel if buffer allocation fails during DMA setup at probe. Later DMA use or cleanup can access that pointer or attempt to release the channel again. The input does not specify attacker access requirements or user interaction.
Engineers running Linux systems that use the ti-qspi driver should check their kernel; affected versions are not specified.