CVE-2026-40290

OP-TEE has a Use-After-Free race in FF-A shared-memory teardown

7.8 high EPSS 0.21%

Published 3 Jun 2026 Updated 4 Jun 2026 CNA: GitHub_M

Check your servers for CVE-2026-40290

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-40290 affects optee_os, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

Description

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.

Severity (CVSS)

7.8 high CVSS 3.1 from GitHub_M (CNA)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.21%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 5.96% of all scored CVEs. Scores of 30 Nov 2026.

The assessment of CISA (SSVC, 4 Jun 2026):

Exploitation
poc: a proof of concept is public
Automatable
no: each attack takes manual steps
Technical impact
total: full control of the component or of its data

Weakness

Affected products

As the CNA lists them.

ProductVersions
optee_os
affected >= 3.16.0, < 4.11.0

Is my server affected?

Find the installed version of optee_os and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.

Debian, Ubuntu

dpkg -l | grep -i optee_os
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2026-40290 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2026-40290

RHEL, Rocky, Alma, Fedora

rpm -q optee_os
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2026-40290

Alpine

apk list --installed | grep -i optee_os

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-40290
trivy image --scanners vuln IMAGE | grep CVE-2026-40290

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Exploits and proof of concept

Source: the record CVE-2026-40290 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.