{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2023-52517",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-02-20T12:30:33.317Z",
        "datePublished": "2024-03-02T21:52:27.152Z",
        "dateUpdated": "2026-08-05T09:10:21.476Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T09:10:21.476Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nspi: sun6i: fix race between DMA RX transfer completion and RX FIFO drain\n\nPreviously the transfer complete IRQ immediately drained to RX FIFO to\nread any data remaining in FIFO to the RX buffer. This behaviour is\ncorrect when dealing with SPI in interrupt mode. However in DMA mode the\ntransfer complete interrupt still fires as soon as all bytes to be\ntransferred have been stored in the FIFO. At that point data in the FIFO\nstill needs to be picked up by the DMA engine. Thus the drain procedure\nand DMA engine end up racing to read from RX FIFO, corrupting any data\nread. Additionally the RX buffer pointer is never adjusted according to\nDMA progress in DMA mode, thus calling the RX FIFO drain procedure in DMA\nmode is a bug.\nFix corruptions in DMA RX mode by draining RX FIFO only in interrupt mode.\nAlso wait for completion of RX DMA when in DMA mode before returning to\nensure all data has been copied to the supplied memory buffer."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The vulnerable sun6i transfer_one/IRQ path is reached by locally submitting SPI transfers (e.g. /dev/spidev SPI_IOC_MESSAGE/read/write or an in-kernel SPI client on Allwinner A31/H3/R329-class boards). It is not reachable from network packets or adjacent wireless frames.\nAC:L - Any DMA-sized RX transfer (len > FIFO depth) deterministically hits the TC-before-DMA-done race: the attacker initiates the transfer and the IRQ drain plus early return follow without needing a narrow external timing window or rare non-default config.\nPR:L - Neither spidev nor the SPI core performs capability checks on the transfer path; access is gated only by the character-device node, which is commonly group-accessible on embedded Allwinner/SBC deployments, so ordinary local user privileges suffice.\nUI:N - The attacker issues the SPI transfers themselves; no separate victim action is required.\nS:U - Corruption and crashes remain inside the host kernel’s SPI/DMA memory under a single security authority; this is not a VM escape or IOMMU/sandbox boundary bypass.\nC:H - Returning and unmapping while RX DMA may still be in flight, plus concurrent IRQ drain and DMA writes into the same RX buffer, is kernel memory-safety failure that can be leveraged for disclosure (including residual DMA touching reused pages and corrupted SPI RX contents).\nI:H - The same DMA-still-active-after-unmap/completion bug yields write-after-free style corruption of remapped pages with SPI-sourced bytes, and dual writers corrupt live transfer buffers—memory corruption suitable for control-flow impact under the higher-severity rule.\nA:H - Unmapping or completing a transfer while RX DMA is still active can fault the DMA/IOMMU path or otherwise oops/panic the kernel, and corrupted SPI DMA state can hang subsequent transfers on the controller."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/spi/spi-sun6i.c"
                    ],
                    "versions": [
                        {
                            "version": "345980a3a5e5e1c99fc621e2ce878fb150ad2287",
                            "lessThan": "bd1ec7f9983b5cd3c77e0f7cda3fa8aed041af2f",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "345980a3a5e5e1c99fc621e2ce878fb150ad2287",
                            "lessThan": "36b29974a7ad2ff604c24ad348f940506c7b1209",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "345980a3a5e5e1c99fc621e2ce878fb150ad2287",
                            "lessThan": "4e149d524678431638ff378ef6025e4e89b71097",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "345980a3a5e5e1c99fc621e2ce878fb150ad2287",
                            "lessThan": "1f11f4202caf5710204d334fe63392052783876d",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/spi/spi-sun6i.c"
                    ],
                    "versions": [
                        {
                            "version": "5.11",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.11",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.134",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.56",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.5.6",
                            "lessThanOrEqual": "6.5.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.11",
                                    "versionEndExcluding": "5.15.134"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.11",
                                    "versionEndExcluding": "6.1.56"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.11",
                                    "versionEndExcluding": "6.5.6"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.11",
                                    "versionEndExcluding": "6.6"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/bd1ec7f9983b5cd3c77e0f7cda3fa8aed041af2f"
                },
                {
                    "url": "https://git.kernel.org/stable/c/36b29974a7ad2ff604c24ad348f940506c7b1209"
                },
                {
                    "url": "https://git.kernel.org/stable/c/4e149d524678431638ff378ef6025e4e89b71097"
                },
                {
                    "url": "https://git.kernel.org/stable/c/1f11f4202caf5710204d334fe63392052783876d"
                }
            ],
            "title": "spi: sun6i: fix race between DMA RX transfer completion and RX FIFO drain",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-02T23:03:20.853Z"
                },
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://git.kernel.org/stable/c/bd1ec7f9983b5cd3c77e0f7cda3fa8aed041af2f",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/36b29974a7ad2ff604c24ad348f940506c7b1209",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/4e149d524678431638ff378ef6025e4e89b71097",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/1f11f4202caf5710204d334fe63392052783876d",
                        "tags": [
                            "x_transferred"
                        ]
                    }
                ]
            },
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2023-52517",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2024-09-10T15:56:43.553628Z"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2024-09-11T17:33:40.654Z"
                }
            }
        ]
    }
}