spi: tegra210-quad: Protect curr_xfer in tegra_qspi_combined_seq_xfer
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ b4e002d8a7cee3b1d70efad0e222567f92a73000 · < bf4528ab28e2bf112c3a2cdef44fd13f007781cd| No fix yet |
| Linux Linux |
| No fix yet |
In the Linux kernel, the following vulnerability has been resolved:
spi: tegra210-quad: Protect curr_xfer in tegra_qspi_combined_seq_xfer
The curr_xfer field is read by the IRQ handler without holding the lock to check if a transfer is in progress. When clearing curr_xfer in the combined sequence transfer loop, protect it with the spinlock to prevent a race with the interrupt handler.
Protect the curr_xfer clearing at the exit path of tegra_qspi_combined_seq_xfer() with the spinlock to prevent a race with the interrupt handler that reads this field.
Without this protection, the IRQ handler could read a partially updated curr_xfer value, leading to NULL pointer dereference or use-after-free.
From the CVE record · Linux
The tegra210-quad SPI driver has a race between a transfer routine clearing curr_xfer and an interrupt handler reading it. If the race occurs, the handler could dereference a NULL pointer or access freed memory; the input does not specify attacker access requirements or user interaction.
Engineers running Linux kernels with the tegra210-quad SPI driver should check whether their kernel includes the fix; affected versions are not specified.