{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2023-41325","id":"CVE-2023-41325","title":"OP-TEE double free in shdr_verify_signature","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 ke","descriptionLong":"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.","published":"2023-09-15T19:40:58.065Z","updated":"2026-10-28T10:35:12.588800845Z","reserved":"2023-08-28T16:56:43.366Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":7.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":7.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N","rating":"high","source":"GitHub_M"},{"version":"3.1","score":7.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N","rating":"high","source":"github.com"},{"version":"3.1","score":6.7,"vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H","rating":"medium","source":"NVD"},{"version":"3.1","score":7.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:H/I:H/A:N","rating":"high","source":"OSV"}],"rating":"high","products":["OP-TEE optee_os"],"affectedProducts":[{"vendor":"OP-TEE","product":"optee_os","defaultStatus":null,"versions":[{"version":">= 3.20, < 3.22","status":"affected"}],"platforms":[]}],"packages":[],"cwes":["CWE-415"],"aliases":["GHSA-jrw7-63cq-7vhm"],"references":[{"url":"https://github.com/OP-TEE/optee_os/security/advisories/GHSA-jrw7-63cq-7vhm","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Vendor Advisory","advisory"]},{"url":"https://github.com/OP-TEE/optee_os/commit/e2ec831cb07ed0099535c7c140cb6338aa62816a","tags":["x_refsource_MISC","x_transferred","Patch","fix"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/41xxx/CVE-2023-41325.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-41325","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total"},"epss":0.00386,"epssPercentile":0.33298,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2023-41325","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-41325","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2023-41325","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2023-41325","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}