CVE-2026-40290

Source
https://cve.org/CVERecord?id=CVE-2026-40290
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40290.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-40290
Aliases
  • GHSA-332c-xr93-849m
Downstream
Published
2026-06-03T16:45:51Z
Modified
2026-10-21T02:57:05Z
Severity
  • 7.8 (High) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
OP-TEE has a Use-After-Free race in FF-A shared-memory teardown
Details

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.

Database specific
{
    "cna_assigner":  "GitHub_M",
    "cwe_ids":  [
        "CWE-416"
    ],
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40290.json"
}
References

Affected packages

Git / github.com/op-tee/optee_os

Affected ranges

Type
GIT
Repo
https://github.com/op-tee/optee_os
Events
Database specific
Show details
{
    "extracted_events":  [
        {
            "range":  [
                {
                    "introduced":  "3.16.0"
                },
                {
                    "fixed":  "4.11.0"
                }
            ],
            "source":  "AFFECTED_FIELD",
            "strategy":  "StringRangeExpression"
        }
    ]
}

Affected versions

3.*
3.16.0
3.17.0
3.17.0-rc1
3.18.0
3.18.0-rc1
3.19.0
3.19.0-rc1
3.20.0
3.20.0-rc1
3.21.0
3.21.0-rc1
3.22.0
3.22.0-rc1
4.*
4.0.0
4.0.0-rc1
4.1.0
4.1.0-rc1
4.10.0
4.10.0-rc1
4.11.0-rc1
4.2.0
4.2.0-rc1
4.3.0
4.3.0-rc1
4.4.0
4.4.0-rc1
4.5.0
4.5.0-rc1
4.6.0
4.6.0-rc1
4.7.0
4.7.0-rc1
4.8.0
4.8.0-rc1
4.9.0
4.9.0-rc1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40290.json"