OP-TEE double free in shdr_verify_signature
Summary
| CVE | CVE-2023-41325 |
|---|---|
| State | PUBLISHED |
| Assigner | GitHub_M |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2023-09-15 20:15:10 UTC |
| Updated | 2026-06-05 20:13:25 UTC |
| 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. |
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
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Primary | 6.7 | MEDIUM | CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | [email protected] | Secondary | 7.4 | HIGH | CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N |
| 3.1 | CNA | DECLARED | 7.4 | HIGH | CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N |
CVSS v3.1 Breakdown
Attack Vector
LocalAttack Complexity
LowPrivileges Required
HighUser Interaction
NoneScope
UnchangedConfidentiality
HighIntegrity
HighAvailability
HighCVSS: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)
| Type | Vendor | Product | Version | Update | Edition | Language |
|---|---|---|---|---|---|---|
| Operating System | Trustedfirmware | Op-tee | All | All | All | All |
| Operating System | Trustedfirmware | Op-tee | 3.22.0 | rc1 | All | All |
Vendor Declared Affected Products
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| 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 |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.