CVE-2023-52517CWE-362

CVE-2023-52517

High · published March 3, 2024

CVSS v3.1
7.8
EPSS
0%
Percentile
7.5
In the wild
Unconfirmed
What it is

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.

The record
Technical detail
CVSS v3.1
7.8 · HIGH
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.00184 · 7.5th percentile
Weakness
CWE-362 · Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')
Published
2024-03-03T03:15Z
Affected products (3)
ProductVersionsFixed in
linux/linux_kernel< 5.15.1345.15.134
linux/linux_kernel≥ 5.16, < 6.1.566.1.56
linux/linux_kernel≥ 6.2, < 6.5.66.5.6
References (8)
EPSS history
Timeline
  • 02 MAR 21:52Z
    spi: sun6i: fix race between DMA RX transfer completion and RX FIFO drain
    cvelistv5