spi: tegra210-quad: Fix timeout handling
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 921fc1838fb036f690b8ba52e6a6d3644b475cbb · < 01bbf25c767219b14c3235bfa85906b8d2cb8fbc| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
spi: tegra210-quad: Fix timeout handling
When the CPU that the QSPI interrupt handler runs on (typically CPU 0) is excessively busy, it can lead to rare cases of the IRQ thread not running before the transfer timeout is reached.
While handling the timeouts, any pending transfers are cleaned up and the message that they correspond to is marked as failed, which leaves the curr_xfer field pointing at stale memory.
To avoid this, clear curr_xfer to NULL upon timeout and check for this condition when the IRQ thread is finally run.
While at it, also make sure to clear interrupts on failure so that new interrupts can be run.
A better, more involved, fix would move the interrupt clearing into a hard IRQ handler. Ideally we would also want to signal that the IRQ thread no longer needs to be run after the timeout is hit to avoid the extra check for a valid transfer.
From the CVE record · Linux
In the Linux kernel’s tegra210-quad SPI driver, a transfer timeout can leave a pointer to stale memory if the CPU handling the QSPI interrupt is excessively busy and the IRQ thread runs late. The input does not establish what an attacker can do or whether exploitation requires network access, authentication, or user interaction.
Engineers running Linux kernels with the tegra210-quad SPI driver should check their versions against the vendor advisory; affected versions were not provided.