Descripción
OP-TEE is a Trusted Execution Environment (TEE) designed as companion to non-secure Linux kernel running on Arm; Cortex-A cores using the TrustZone technology. In version 4.5.0, specially crafted tee-supplicant binary in REE userspace, an attacker can trigger panic TA that uses libutee Secure Storage API. Many functions libutee, specifically those which make up API, will if system call returns unexpected return code. This behavior mandated by TEE Internal Core API specification. However, OP-TEE’s implementation, codes of secure storage operations are passed through unsanitized from tee-supplicant, tee-driver, OP-TEE kernel, back libutee. Thus, with access and ability stop replace it their own process (generally trivial for root user, depending way permissions set up, potentially available even less privileged users) run malicious responds requests response codes, triggering requesting TA. particularly dangerous TAs built `TA_FLAG_SINGLE_INSTANCE` (corresponding `gpd.ta.singleInstance` `TA_FLAG_INSTANCE_KEEP_ALIVE` `gpd.ta.keepAlive`). The these may depend memory preserved between sessions, reload clean space compromise TAs. A critical example this optee_ftpm It kept alive hold PCR values, crucially must be non-resettable. An who fTPM reset PCRs, then extend them PCRs whatever they choose, falsifying boot measurements, accessing sealed data, more. impact issue depends significantly affected For some, could manifest denial service, while others, like TA, result disclosure sensitive data. Anyone affected, but similar attacks possible other leverage fix commit 941a58d78c99c4754fbd4ec3079ec9e1d596af8f.
https://github.com/OP-TEE/optee_os/commit/941a58d78c99c4754fbd4ec3079ec9e1d596af8f
https://github.com/OP-TEE/optee_os/security/advisories/GHSA-f35r-hm2m-p6c3