{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2023-52687",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-03-07T14:49:46.888Z",
        "datePublished": "2024-05-17T14:24:48.665Z",
        "dateUpdated": "2026-08-05T09:11:01.883Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T09:11:01.883Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: safexcel - Add error handling for dma_map_sg() calls\n\nMacro dma_map_sg() may return 0 on error. This patch enables\nchecks in case of the macro failure and ensures unmapping of\npreviously mapped buffers with dma_unmap_sg().\n\nFound by Linux Verification Center (linuxtesting.org) with static\nanalysis tool SVACE."
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 9.8,
                        "baseSeverity": "CRITICAL"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:N - The Inside Secure EIP97/EIP197 lookaside engine on Marvell Armada and MediaTek MT7986 networking appliances accelerates IPsec AEAD algorithms (gcm(aes), authenc(hmac(sha*),cbc(aes))) at cra_priority 300, so inbound ESP hits esp_input→crypto_aead_decrypt→safexcel_send_req→dma_map_sg over the network before authentication completes.\nAC:L - A remote or local attacker can induce dma_map_sg() failure via memory/IOVA/swiotlb exhaustion (large multi-frag ESP floods or concurrent AF_ALG requests); once mapping fails the driver deterministically programs the engine with stale/unmapped SG DMA addresses with no race to win.\nPR:N - Crafted ESP packets to an existing IPsec SA exercise the vulnerable path with no privileges on the target; AEAD decrypt (including dma_map_sg) runs as part of packet processing before authenticity is established.\nUI:N - Exploitation requires only attacker-sent ESP (or AF_ALG) crypto requests; no victim user action such as mounting a filesystem or opening a file is needed.\nS:U - Impact is host-kernel memory corruption/DoS under the same kernel security authority; this is not a guest-to-host escape or intentional IOMMU isolation bypass across separate authorities.\nC:H - On dma-direct partial map failure, successfully mapped SG entries are unmapped but dma_address is left stale, so the engine DMAs from recycled pages (use-after-unmap); with separate src/dst, a failed src map plus successful dst map can encrypt unintended physical memory into attacker-readable output under a known key.\nI:H - The same stale/unmapped DMA addresses are used for DMA_FROM_DEVICE/BIDIRECTIONAL result writes, so the crypto engine writes into memory that may have been reused by other kernel subsystems, enabling arbitrary corruption and control-flow hijack primitives.\nA:H - Programming the EIP97/EIP197 with unmapped or DMA_MAPPING_ERROR addresses causes bus/IOMMU faults, driver failures, and kernel oops/panic, fully denying service on affected appliances."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/crypto/inside-secure/safexcel_cipher.c"
                    ],
                    "versions": [
                        {
                            "version": "49186a7d9e46ff132a0ed9b721ad6b6a58dba6c1",
                            "lessThan": "4c0ac81a172a69a7733290915276672787e904ec",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "49186a7d9e46ff132a0ed9b721ad6b6a58dba6c1",
                            "lessThan": "8084b788c2fb1260f7d44c032d5124680b20d2b2",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "49186a7d9e46ff132a0ed9b721ad6b6a58dba6c1",
                            "lessThan": "fc0b785802b856566df3ac943e38a072557001c4",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "49186a7d9e46ff132a0ed9b721ad6b6a58dba6c1",
                            "lessThan": "87e02063d07708cac5bfe9fd3a6a242898758ac8",
                            "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/crypto/inside-secure/safexcel_cipher.c"
                    ],
                    "versions": [
                        {
                            "version": "6.1",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.1",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.75",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.14",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.7.2",
                            "lessThanOrEqual": "6.7.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.8",
                            "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": "6.1",
                                    "versionEndExcluding": "6.1.75"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.1",
                                    "versionEndExcluding": "6.6.14"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.1",
                                    "versionEndExcluding": "6.7.2"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.1",
                                    "versionEndExcluding": "6.8"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/4c0ac81a172a69a7733290915276672787e904ec"
                },
                {
                    "url": "https://git.kernel.org/stable/c/8084b788c2fb1260f7d44c032d5124680b20d2b2"
                },
                {
                    "url": "https://git.kernel.org/stable/c/fc0b785802b856566df3ac943e38a072557001c4"
                },
                {
                    "url": "https://git.kernel.org/stable/c/87e02063d07708cac5bfe9fd3a6a242898758ac8"
                }
            ],
            "title": "crypto: safexcel - Add error handling for dma_map_sg() calls",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "problemTypes": [
                    {
                        "descriptions": [
                            {
                                "type": "CWE",
                                "lang": "en",
                                "description": "CWE-noinfo Not enough information"
                            }
                        ]
                    }
                ],
                "metrics": [
                    {
                        "cvssV3_1": {
                            "scope": "UNCHANGED",
                            "version": "3.1",
                            "baseScore": 5.5,
                            "attackVector": "LOCAL",
                            "baseSeverity": "MEDIUM",
                            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
                            "integrityImpact": "NONE",
                            "userInteraction": "NONE",
                            "attackComplexity": "LOW",
                            "availabilityImpact": "HIGH",
                            "privilegesRequired": "LOW",
                            "confidentialityImpact": "NONE"
                        }
                    },
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "timestamp": "2024-05-31T18:46:13.483061Z",
                                "id": "CVE-2023-52687",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "role": "CISA Coordinator",
                                "version": "2.0.3"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2024-11-06T16:44:03.755Z"
                }
            },
            {
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-02T23:11:34.555Z"
                },
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://git.kernel.org/stable/c/4c0ac81a172a69a7733290915276672787e904ec",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/8084b788c2fb1260f7d44c032d5124680b20d2b2",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/fc0b785802b856566df3ac943e38a072557001c4",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://git.kernel.org/stable/c/87e02063d07708cac5bfe9fd3a6a242898758ac8",
                        "tags": [
                            "x_transferred"
                        ]
                    }
                ]
            }
        ]
    }
}