OP-TEE double free in shdr_verify_signature

Summary

CVECVE-2023-41325
StatePUBLISHED
AssignerGitHub_M
Source PriorityCVE Program / NVD first with legacy fallback
Published2023-09-15 20:15:10 UTC
Updated2026-06-05 20:13:25 UTC
DescriptionOP-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.

Risk And Classification

Primary CVSS: v3.1 6.7 MEDIUM from [email protected]

CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

EPSS: 0.000800000 probability, percentile 0.235820000 (date 2026-06-11)

Problem Types: CWE-415 | CWE-415 CWE-415: Double Free


VersionSourceTypeScoreSeverityVector
3.1[email protected]Primary6.7MEDIUMCVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H
3.1[email protected]Secondary7.4HIGHCVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N
3.1CNADECLARED7.4HIGHCVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N

CVSS v3.1 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Operating System Trustedfirmware Op-tee All All All All
Operating System Trustedfirmware Op-tee 3.22.0 rc1 All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA OP-TEE Optee Os affected >= 3.20, < 3.22 Not specified

References

ReferenceSourceLinkTags
Double free in shdr_verify_signature · Advisory · OP-TEE/optee_os · GitHub af854a3a-2127-422b-91ae-364da2661108 github.com Exploit, Vendor Advisory
core: crypto_bignum_free(): add indirection and set pointer to NULL · OP-TEE/optee_os@e2ec831 · GitHub af854a3a-2127-422b-91ae-364da2661108 github.com Patch
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report