OP-TEE: RSASSA EMSA- PKCS1-v1_5 underflow in emsa_pkcs1_v1_5_encode()
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-33662
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 05:14 UTC · Revision 1
Source evidence
OP-TEE: RSASSA EMSA- PKCS1-v1_5 underflow in emsa_pkcs1_v1_5_encode()
core-osv · Original sourcePublished 24 Apr 2026, 18:13 UTC
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.
osv:CVE-2026-33662
Complete source record
{
"id": "8fd8164292fcd15eb0db731b380faa7699d4b53945a3636f8159fe20ca203014",
"url": "https://osv.dev/vulnerability/CVE-2026-33662",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "OP-TEE: RSASSA EMSA- PKCS1-v1_5 underflow in emsa_pkcs1_v1_5_encode()",
"summary": "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.",
"evidence": "osv:CVE-2026-33662",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-33662",
"aliases": [
"CVE-2026-33662",
"GHSA-4cf8-v5g3-73gr"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/op-tee/optee_os",
"type": "GIT",
"events": [
{
"introduced": "023e33656e2c9557ce50ad63a98b2e2c9b51c118"
},
{
"last_affected": "753afbbee1682f5d16fd30e87b31058a4fd4f4b8"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "3.8.0"
},
{
"last_affected": "4.10"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
}
]
}
}
],
"versions": [
"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",
"3.21.0-rc1",
"3.20.0",
"3.20.0-rc1",
"3.19.0",
"3.19.0-rc1",
"3.18.0",
"3.18.0-rc1",
"3.17.0",
"3.17.0-rc1",
"3.16.0",
"3.15.0",
"3.15.0-rc1",
"3.14.0",
"3.14.0-rc1",
"3.13.0",
"3.13.0-rc1",
"3.12.0",
"3.12.0-rc1",
"3.11.0",
"3.11.0-rc1",
"3.10.0",
"3.10.0-rc1",
"3.9.0",
"3.9.0-rc1",
"3.8.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-33662.json"
}
}
],
"modified": "2026-10-28T02:30:33.389451829Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33662.json",
"https://github.com/OP-TEE/optee_os/security/advisories/GHSA-4cf8-v5g3-73gr",
"https://nvd.nist.gov/vuln/detail/CVE-2026-33662"
],
"provider_metadata": {
"cwe_ids": [
"CWE-190"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33662.json"
}
},
"related_cves": [
{
"value": "CVE-2026-33662",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 500460,
"published_at": "2026-04-24T18:13:28.529+00:00"
}