{"id":"CVE-2026-40257","summary":"OP-TEE has SHA-3 accelerated finalize heap overflow","details":"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`.","aliases":["GHSA-75x4-j8p9-55qv"],"modified":"2026-10-21T02:57:05.009420708Z","published":"2026-07-06T16:26:20.379Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40257.json","cna_assigner":"GitHub_M","cwe_ids":["CWE-787"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40257.json"},{"type":"ADVISORY","url":"https://github.com/OP-TEE/optee_os/security/advisories/GHSA-75x4-j8p9-55qv"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40257"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/op-tee/optee_os","events":[{"introduced":"e8abbcfbdf63437a640d5fd87b7e191caab6445e"},{"fixed":"f54190f22611dd5ad5d22546fd4209aa100f56bd"}],"database_specific":{"extracted_events":[{"strategy":"StringRangeExpression","range":[{"introduced":"3.21.0"},{"fixed":"4.11.0"}],"source":"AFFECTED_FIELD"}]}}],"versions":["4.11.0-rc1","4.10.0","4.10.0-rc1","4.9.0","4.9.0-rc1","4.8.0","4.8.0-rc1","4.7.0","4.7.0-rc1","4.6.0","4.6.0-rc1","4.5.0","4.5.0-rc1","4.4.0","4.4.0-rc1","4.3.0","4.3.0-rc1","4.2.0","4.2.0-rc1","4.1.0","4.1.0-rc1","4.0.0","4.0.0-rc1","3.22.0","3.22.0-rc1","3.21.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40257.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"}]}