{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-40290",
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "state": "PUBLISHED",
        "assignerShortName": "GitHub_M",
        "dateReserved": "2026-04-10T20:22:44.035Z",
        "datePublished": "2026-06-03T16:45:51.204Z",
        "dateUpdated": "2026-06-04T14:18:01.010Z"
    },
    "containers": {
        "cna": {
            "title": "OP-TEE has a Use-After-Free race in FF-A shared-memory teardown",
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "cweId": "CWE-416",
                            "lang": "en",
                            "description": "CWE-416: Use After Free",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "attackComplexity": "LOW",
                        "attackVector": "LOCAL",
                        "availabilityImpact": "HIGH",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH",
                        "confidentialityImpact": "HIGH",
                        "integrityImpact": "HIGH",
                        "privilegesRequired": "LOW",
                        "scope": "UNCHANGED",
                        "userInteraction": "NONE",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "version": "3.1"
                    }
                }
            ],
            "references": [
                {
                    "name": "https://github.com/OP-TEE/optee_os/security/advisories/GHSA-332c-xr93-849m",
                    "tags": [
                        "x_refsource_CONFIRM"
                    ],
                    "url": "https://github.com/OP-TEE/optee_os/security/advisories/GHSA-332c-xr93-849m"
                }
            ],
            "affected": [
                {
                    "vendor": "OP-TEE",
                    "product": "optee_os",
                    "versions": [
                        {
                            "version": ">= 3.16.0, < 4.11.0",
                            "status": "affected"
                        }
                    ]
                }
            ],
            "providerMetadata": {
                "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
                "shortName": "GitHub_M",
                "dateUpdated": "2026-06-03T16:46:25.913Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "OP-TEE is a Trusted Execution Environment (TEE) designed as companion to a non-secure Linux kernel running on Arm; Cortex-A cores using the TrustZone technology. Starting in version 3.16.0 and prior to 4.11.0, a user-after-free (UAF) race condition exists in the shared memory teardown logic of FF-A  within OP-TEE SPMC/SP flows. This only applies when OP-TEE is configured as an SPMC for S-EL0 SPs, that is, with `CFG_SECURE_PARTITION=y`. The function `sp_mem_remove()`, responsible for freeing entries in `smem->receivers` and `smem->regions`, fails to acquire the global `sp_mem_lock` before performing the `free()` operations. Concurrently, other code paths, such as `sp_mem_get_receiver()`, iterate over these same lists without holding a lock, or, like `sp_mem_is_shared()`, iterate while holding the lock but are not serialized against the unprotected `free()` in `sp_mem_remove()`. This creates a cross-thread race where a thread iterating the list can acquire a pointer to an entry (e.g., `struct sp_mem_map_region` or `struct sp_mem_receiver`), and then another thread calls `sp_mem_remove()`, freeing the object. When the first thread resumes and dereferences the pointer, it results in a Use-After-Free vulnerability. Version 4.11.0 fixes the issue."
                }
            ],
            "source": {
                "advisory": "GHSA-332c-xr93-849m",
                "discovery": "UNKNOWN"
            }
        },
        "adp": [
            {
                "references": [
                    {
                        "url": "https://github.com/OP-TEE/optee_os/security/advisories/GHSA-332c-xr93-849m",
                        "tags": [
                            "exploit"
                        ]
                    }
                ],
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "timestamp": "2026-06-04T14:17:15.528743Z",
                                "id": "CVE-2026-40290",
                                "options": [
                                    {
                                        "Exploitation": "poc"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "total"
                                    }
                                ],
                                "role": "CISA Coordinator",
                                "version": "2.0.3"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2026-06-04T14:18:01.010Z"
                }
            }
        ]
    }
}