7.5high
OP-TEE: RSASSA EMSA- PKCS1-v1_5 underflow in emsa_pkcs1_v1_5_encode()
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.42% (higher than 38% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
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. From 3.8.0 to 4.10, in the function emsa_pkcs1_v1_5_encode() in core/drivers/crypto/crypto_api/acipher/rsassa.c, the amount of padding needed, "PS size", is calculated by subtracting the size of the digest and other fields required for the EMA-PKCS1-v1_5 encoding from the size of the modulus of the key. By selecting a small enough modulus, this subtraction can overflow. The padding is added as a string of 0xFF bytes with a call to memset(), and an underflowed integer will cause the memset() call to overwrite until OP-TEE crashes. This only affects platforms registering RSA acceleration.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| OP-TEE optee_os | >= 3.8.0, <= 4.10 | CVE List |
| trustedfirmware op-tee | from 3.8.0 up to 4.10.0 | NVD |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
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. From 3.8.0 to 4.10, in the function emsa_pkcs1_v1_5_encode() in core/drivers/crypto/crypto_api/acipher/rsassa.c, the amount of padding needed, "PS size", is calculated by subtracting the size of the digest and other fields required for the EMA-PKCS1-v1_5 encoding from the size of the modulus of the key. By selecting a small enough modulus, this subtraction can overflow. The padding is added as a string of 0xFF bytes with a call to memset(), and an underflowed integer will cause the memset() call to overwrite until OP-TEE crashes. This only affects platforms registering RSA acceleration.
NVD (es)
OP-TEE es un Entorno de Ejecución Confiable (TEE) diseñado como compañero de un kernel de Linux no seguro ejecutándose en núcleos Arm Cortex-A que utilizan la tecnología TrustZone. Desde la versión 3.8.0 hasta la 4.10, en la función emsa_pkcs1_v1_5_encode() en core/drivers/crypto/crypto_api/acipher/rsassa.c, la cantidad de relleno necesaria, ’tamaño PS’, se calcula restando el tamaño del digest y otros campos requeridos para la codificación EMA-PKCS1-v1_5 del tamaño del módulo de la clave. Al seleccionar un módulo lo suficientemente pequeño, esta resta puede desbordarse. El relleno se añade como una cadena de bytes 0xFF con una llamada a memset(), y un entero desbordado por debajo hará que la llamada a memset() sobrescriba hasta que OP-TEE falle. Esto solo afecta a las plataformas que registran aceleración RSA.
References
| https://github.com/OP-TEE/optee_os/security/advisories/GHSA-4cf8-v5g3-73gr | patch, vendor-advisory | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-33662 changed 2026-04-24 | CVE Terms of Use |
| NVD | CVE-2026-33662 changed 2026-10-26 | Public domain |