CVE-2026-40257

OP-TEE has SHA-3 accelerated finalize heap overflow

Published Jul 6, 2026 CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
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.21.0 and prior to version 4.11.0, the ARM Crypto Extensions accelerated SHA-3 implementation has an off-by-one error that can cause a massive heap overflow that corrupts all TEE kernel memory following the hash state. This affects all platforms built with `CFG_CRYPTO_WITH_CE82=y` (ARMv8.2+ with SHA3 Crypto Extensions). Version 4.11.0 contains a patch. As a workaround, disable SHA3 Crypto Extensions with `CFG_CRYPTO_WITH_CE82=n`.

Analysis

AI-generated

Technical impact

An off‑by‑one error in the accelerated SHA‑3 finalize routine of OP‑TEE’s ARM Crypto Extensions causes a massive heap overflow that corrupts all TEE kernel memory after the hash state. The overflow can overwrite critical internal data structures or code, exposing the trusted environment to potential compromise. The weakness is a classic out‑of‑bounds write (CWE‑787).

Affected Systems

OP‑TEE OS versions starting from 3.21.0 up to the release preceding 4.11.0 are vulnerable when the accelerated SHA‑3 path is enabled via the configuration flag CFG_CRYPTO_WITH_CE82=y. The issue applies to ARM Cortex‑A platforms supporting ARMv8.2+ TrustZone and the SHA‑3 Crypto Extensions. The0.

Risk and Exploitability

The CVSS score of 5.5 indicates moderate severity. The EPSS score of <1% and the absence from the CISA KEV catalog suggest that exploitation has not been observed at scale. An attacker would need to execute code within the trusted environment—either through a malicious trusted application or from the host side—to trigger the SHA‑3 finalize with crafted input that triggers the overflow.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade OP‑TEE to version 4.11.0 or later, which contains the off‑by‑one bug fix.
  • If an upgrade is not possible, disable the accelerated SHA‑3 implementation by clearing the CFG_CRYPTO_WITH_CE82 flag during build.
  • For custom forks or rebuilt images, apply the 4.11.0 patch or add a bounds check to the SHA‑3 finalize routine to prevent the overflow.

Generated by OpenCVE AI on August 1, 2026 at 18:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Op-tee
Op-tee op-tee Os
Vendors & Products Op-tee
Op-tee op-tee Os
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.21.0 and prior to version 4.11.0, the ARM Crypto Extensions accelerated SHA-3 implementation has an off-by-one error that can cause a massive heap overflow that corrupts all TEE kernel memory following the hash state. This affects all platforms built with `CFG_CRYPTO_WITH_CE82=y` (ARMv8.2+ with SHA3 Crypto Extensions). Version 4.11.0 contains a patch. As a workaround, disable SHA3 Crypto Extensions with `CFG_CRYPTO_WITH_CE82=n`.
Title OP-TEE has SHA-3 accelerated finalize heap overflow
Weaknesses CWE-787
References
Metrics cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 6, 2026, 6:57 PM
Reserved
Apr 10, 2026, 5:31 PM
Status
Analyzed
Published
Jul 6, 2026, 5:16 PM
Modified
Oct 25, 2026, 8:10 PM