CVE-2023-52517·Kernel vulnerability
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.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.5.6
- Published
- 2024-03-02
Affected versions
From: 6.2
Until: 6.5.6
Fixed in: 6.5.6
How to fix this CVE
Update your Linux kernel to version 6.5.6 or later to resolve a critical race condition in the sun6i SPI driver's DMA handling. This vulnerability causes data corruption during DMA-based SPI transfers by introducing a race between the transfer completion interrupt and the DMA engine when reading from the RX FIFO. Immediate patching is recommended for systems using sun6i SPI controllers with DMA mode enabled.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check installed kernel version with `uname -r` and compare against affected range 6.2 to 6.5.5
- Step 2: Verify sun6i SPI driver is loaded with `lsmod | grep sun6i` or check `cat /proc/modules | grep spi`
- Step 3: Check kernel logs for SPI DMA-related errors with `dmesg | grep -i 'spi\|dma' | tail -50` and look for corruption warnings or data inconsistencies
- Step 4: After patching to 6.5.6+, verify with `uname -r` and reboot if necessary, then re-check logs to confirm no SPI DMA errors persist
FAQ
What is CVE-2023-52517?
CVE-2023-52517 is a race condition vulnerability in the Linux kernel's sun6i SPI driver where the transfer completion interrupt handler attempts to drain the RX FIFO at the same time the DMA engine is reading from it, resulting in corrupted SPI data during DMA transfers.
Is CVE-2023-52517 being actively exploited?
No, CVE-2023-52517 is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are currently available. However, it causes silent data corruption on affected systems.
What versions of Kernel are affected by CVE-2023-52517?
Linux kernel versions 6.2 through 6.5.5 are vulnerable. Version 6.5.6 and later contain the fix.
How do I check if my server is vulnerable to CVE-2023-52517?
Run `uname -r` to check your kernel version. If it shows a version between 6.2 and 6.5.5 and `lsmod | grep sun6i` returns results, your system is vulnerable.
Does Defensia detect CVE-2023-52517?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2023-52517 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- 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
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2023-52517. Free for 1 server.
Get started free