CVE-2023-52517

spi: sun6i: fix race between DMA RX transfer completion and RX FIFO drain

HIGH
7
CVSS Score
Published: March 2, 2024 at 09:52 PM UTC
Updated: August 5, 2026 at 09:25 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: spi: sun6i: fix race between DMA RX transfer completion and RX FIFO drain Previously the transfer complete IRQ immediately drained to RX FIFO to read any data remaining in FIFO to the RX buffer. This behaviour is correct when dealing with SPI in interrupt mode. However in DMA mode the transfer complete interrupt still fires as soon as all bytes to be transferred have been stored in the FIFO. At that point data in the FIFO still needs to be picked up by the DMA engine. Thus the drain procedure and DMA engine end up racing to read from RX FIFO, corrupting any data read. Additionally the RX buffer pointer is never adjusted according to DMA progress in DMA mode, thus calling the RX FIFO drain procedure in DMA mode is a bug. Fix corruptions in DMA RX mode by draining RX FIFO only in interrupt mode. Also wait for completion of RX DMA when in DMA mode before returning to ensure all data has been copied to the supplied memory buffer.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 5.15.1345.11 ≤ v < 5.15.1345.11 ≤ v < 6.1.565.11 ≤ v < 6.5.65.11 ≤ v < 6.65.16 ≤ v < 6.1.566.2 ≤ v < 6.5.6345980a3a5e5e1c99fc621e2ce878fb150ad22875.11
Vendor states this is fixed in 1f11f4202caf5710204d334fe63392052783876d (fixed)
Vendor states this is fixed in 36b29974a7ad2ff604c24ad348f940506c7b1209 (fixed)
Vendor states this is fixed in 4e149d524678431638ff378ef6025e4e89b71097 (fixed)
Vendor states this is fixed in bd1ec7f9983b5cd3c77e0f7cda3fa8aed041af2f (fixed)
Vendor states this is fixed in 5.11 (unaffected)
Vendor states this is fixed in 5.15.134 (unaffected)
Vendor states this is fixed in 6.1.56 (unaffected)
Vendor states this is fixed in 6.5.6 (unaffected)
Vendor states this is fixed in 6.6 (unaffected)

References (4)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1f11f4202caf5710204d334fe63392052783876d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/36b29974a7ad2ff604c24ad348f940506c7b1209
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/4e149d524678431638ff378ef6025e4e89b71097
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/bd1ec7f9983b5cd3c77e0f7cda3fa8aed041af2f

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
HIGH
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-362

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card