spi: sprd: fix error pointer deref after DMA setup failure
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 386119bc7be9fa5114ced0274a22a943df890b4b · < be409d2bbe9ca7da7b05cc7dde7499bc481f0766| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
spi: sprd: fix error pointer deref after DMA setup failure
The driver falls back to PIO mode if DMA setup fails during probe.
Make sure to check the dma.enabled flag before trying to release the DMA channels also on late probe errors to avoid dereferencing an error pointer (or attempting to release a channel a second time).
This issue was flagged by Sashiko when reviewing a devres allocation conversion patch.
From the CVE record · Linux
The Linux kernel’s spi: sprd driver can dereference an error pointer or release a DMA channel twice if DMA setup fails and a later probe error occurs. The input does not identify an attacker path, authentication requirement, or user interaction.
Engineers running the Linux kernel with the spi: sprd driver should check their kernel version; affected versions are not specified.