CVE-2023-52517
Severity CVSS v4.0:
Pending analysis
Type:
CWE-362
Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Publication date:
02/03/2024
Last modified:
13/01/2025
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
spi: sun6i: fix race between DMA RX transfer completion and RX FIFO drain<br />
<br />
Previously the transfer complete IRQ immediately drained to RX FIFO to<br />
read any data remaining in FIFO to the RX buffer. This behaviour is<br />
correct when dealing with SPI in interrupt mode. However in DMA mode the<br />
transfer complete interrupt still fires as soon as all bytes to be<br />
transferred have been stored in the FIFO. At that point data in the FIFO<br />
still needs to be picked up by the DMA engine. Thus the drain procedure<br />
and DMA engine end up racing to read from RX FIFO, corrupting any data<br />
read. Additionally the RX buffer pointer is never adjusted according to<br />
DMA progress in DMA mode, thus calling the RX FIFO drain procedure in DMA<br />
mode is a bug.<br />
Fix corruptions in DMA RX mode by draining RX FIFO only in interrupt mode.<br />
Also wait for completion of RX DMA when in DMA mode before returning to<br />
ensure all data has been copied to the supplied memory buffer.
Impact
Base Score 3.x
7.00
Severity 3.x
HIGH
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.15.134 (excluding) | |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.56 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.5.6 (excluding) |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/1f11f4202caf5710204d334fe63392052783876d
- https://git.kernel.org/stable/c/36b29974a7ad2ff604c24ad348f940506c7b1209
- https://git.kernel.org/stable/c/4e149d524678431638ff378ef6025e4e89b71097
- https://git.kernel.org/stable/c/bd1ec7f9983b5cd3c77e0f7cda3fa8aed041af2f
- https://git.kernel.org/stable/c/1f11f4202caf5710204d334fe63392052783876d
- https://git.kernel.org/stable/c/36b29974a7ad2ff604c24ad348f940506c7b1209
- https://git.kernel.org/stable/c/4e149d524678431638ff378ef6025e4e89b71097
- https://git.kernel.org/stable/c/bd1ec7f9983b5cd3c77e0f7cda3fa8aed041af2f



