CVE-2023-41325

OP-TEE double free in shdr_verify_signature

MEDIUM
6.7
CVSS Score
Published: September 15, 2023 at 07:40 PM UTC
Updated: June 17, 2026 at 06:21 AM UTC
2 products affected across 2 vendorsOp TeeOP-TEE

Using optee_os by OP-TEE?

Get instant alerts when new vulnerabilities affect optee_os - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM6.7
Exploit prediction
EPSS 0.4%
SSVC
PoC

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.20 and prior to version 3.22, `shdr_verify_signature` can make a double free. `shdr_verify_signature` used to verify a TA binary before it is loaded. To verify a signature of it, allocate a memory for RSA key. RSA key allocate function (`sw_crypto_acipher_alloc_rsa_public_key`) will try to allocate a memory (which is optee’s heap memory). RSA key is consist of exponent and modulus (represent as variable `e`, `n`) and it allocation is not atomic way, so it may succeed in `e` but fail in `n`. In this case sw_crypto_acipher_alloc_rsa_public_key` will free on `e` and return as it is failed but variable ‘e’ is remained as already freed memory address . `shdr_verify_signature` will free again that memory (which is `e`) even it is freed when it failed allocate RSA key. A patch is available in version 3.22. No known workarounds are available.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

3.20.0 ≤ v < 3.22.03.22.0 rc1
Affected range stops below 3.22.0, so it looks safe — our inference, not a vendor statement
v < 3.22
Affected range stops below 3.22, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

SSVC — Action Prioritization

SSVCPoCNot automatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
HIGH
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-415

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card