CVE-2026-40290: OP-TEE has a Use-After-Free race in FF-A shared-memory teardown
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 CFGSECUREPARTITION=y. The function spmemremove(), responsible for freeing entries in smem->receivers and smem->regions, fails to acquire the global spmemlock before performing the free() operations. Concurrently, other code paths, such as spmemgetreceiver(), iterate over these same lists without holding a lock, or, like spmemisshared(), iterate while holding the lock but are not serialized against the unprotected free() in spmemremove(). This creates a cross-thread race where a thread iterating the list can acquire a pointer to an entry (e.g., struct spmemmapregion or struct spmemreceiver), and then another thread calls spmemremove(), 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
OP-TEEto a version that resolves this vulnerability.Fixed in 4.11.0
Event History
Frequently Asked Questions
What is the severity of CVE-2026-40290?
CVE-2026-40290 has a severity score of 7.8, indicating high risk.
How does CVE-2026-40290 affect OP-TEE?
CVE-2026-40290 affects the shared memory teardown logic in OP-TEE, leading to a use-after-free condition.
What versions of OP-TEE are impacted by CVE-2026-40290?
CVE-2026-40290 affects OP-TEE versions starting from 3.16.0 to before 4.11.0.
How can I fix CVE-2026-40290?
To fix CVE-2026-40290, upgrade OP-TEE to version 4.11.0 or later.
What is a use-after-free vulnerability in the context of CVE-2026-40290?
In the context of CVE-2026-40290, a use-after-free vulnerability occurs when memory that has already been freed is accessed, potentially leading to unexpected behavior or security breaches.