CVE-2025-46733

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

No configuration.

History

07 Jul 2025, 17:15

Type Values Removed Values Added
References () https://github.com/OP-TEE/optee_os/security/advisories/GHSA-f35r-hm2m-p6c3 - () https://github.com/OP-TEE/optee_os/security/advisories/GHSA-f35r-hm2m-p6c3 -
Summary
  • (es) OP-TEE es un Entorno de Ejecución Confiable (TEE) diseñado para complementar un kernel Linux no seguro que se ejecuta en núcleos Arm; los núcleos Cortex-A utilizan la tecnología TrustZone. En la versión 4.5.0, mediante un binario tee-supplicant especialmente manipulado que se ejecuta en el espacio de usuario de REE, un atacante puede generar un pánico en un TA que utiliza la API de Almacenamiento Seguro de libutee. Muchas funciones de libutee, en particular las que conforman la API de Almacenamiento Seguro, entrarán en pánico si una llamada al sistema devuelve un código de retorno inesperado. Este comportamiento está estipulado por la especificación de la API del Núcleo Interno de TEE. Sin embargo, en la implementación de OP-TEE, los códigos de retorno de las operaciones de almacenamiento seguro se transfieren sin sanear desde el tee-supplicant de REE, a través del controlador tee del kernel de Linux, a través del kernel de OP-TEE, de vuelta a libutee. De este modo, un atacante con acceso al espacio de usuario REE y la capacidad de detener tee-supplicant y reemplazarlo con su propio proceso (generalmente trivial para un usuario root y, dependiendo de la forma en que se configuren los permisos, potencialmente disponible incluso para usuarios menos privilegiados) puede ejecutar un proceso tee-supplicant malicioso que responde a las solicitudes de almacenamiento con códigos de respuesta inesperados, lo que provoca pánico en el TA solicitante. Esto es particularmente peligroso para los TA creados con `TA_FLAG_SINGLE_INSTANCE` (que corresponde a `gpd.ta.singleInstance` y `TA_FLAG_INSTANCE_KEEP_ALIVE` (que corresponde a `gpd.ta.keepAlive`). El comportamiento de estos TA puede depender de la memoria que se conserva entre sesiones, y la capacidad de un atacante de generar pánico en el TA y recargarlo con un espacio de memoria limpio puede comprometer el comportamiento de esos TA. Un ejemplo crítico de esto es el TA optee_ftpm. Utiliza la memoria viva mantenida para almacenar valores de PCR, que crucialmente deben ser no reiniciables. Un atacante que puede provocar un pánico en el TA fTPM puede reiniciar los PCR y luego extenderlos con lo que elija, falsificando mediciones de arranque, accediendo a datos sellados y potencialmente más. El impacto de este problema depende significativamente del comportamiento de los TA afectados. Para algunos, podría manifestarse como una denegación de servicio, mientras que para otros, como el TA fTPM, Puede resultar en la divulgación de datos confidenciales. Cualquier usuario de la TA fTPM se ve afectado, pero podrían producirse ataques similares en otras TA que utilizan la API de Almacenamiento Seguro. Hay una solución disponible en el commit 941a58d78c99c4754fbd4ec3079ec9e1d596af8f.

04 Jul 2025, 14:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-07-04 14:15

Updated : 2025-07-08 16:18


NVD link : CVE-2025-46733

Mitre link : CVE-2025-46733

CVE.ORG link : CVE-2025-46733


JSON object : View

Products Affected

No product.

CWE
CWE-755

Improper Handling of Exceptional Conditions