CVE-2023-41325

7.4 HIGH

📋 TL;DR

CVE-2023-41325 is a double-free vulnerability in OP-TEE's TA binary signature verification function. This allows attackers to potentially corrupt memory and execute arbitrary code in the trusted execution environment. Affects OP-TEE versions 3.20 through 3.21 on Arm Cortex-A systems using TrustZone technology.

💻 Affected Systems

Products:
  • OP-TEE (Open Portable Trusted Execution Environment)
Versions: 3.20 through 3.21
Operating Systems: Linux with OP-TEE integration
Default Config Vulnerable: ⚠️ Yes
Notes: Affects Arm Cortex-A systems using TrustZone technology. Requires TA binary loading functionality to be enabled.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of the Trusted Execution Environment, allowing execution of arbitrary code with TEE privileges, potentially leading to secure data exfiltration or system takeover.

🟠

Likely Case

Memory corruption leading to TEE crashes (denial of service) or limited information disclosure from the secure environment.

🟢

If Mitigated

If proper isolation is maintained, impact may be limited to TEE crashes without affecting the normal operating system.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires ability to load malicious TA binaries and trigger signature verification failures. No public exploits have been reported.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.22

Vendor Advisory: https://github.com/OP-TEE/optee_os/security/advisories/GHSA-jrw7-63cq-7vhm

Restart Required: Yes

Instructions:

1. Update OP-TEE to version 3.22 or later. 2. Rebuild the OP-TEE firmware. 3. Flash the updated firmware to affected devices. 4. Reboot the system to load the patched firmware.

🔧 Temporary Workarounds

Disable TA binary loading

linux

Prevent loading of new TA binaries to avoid triggering the vulnerable code path.

# Configure OP-TEE to disable TA binary loading via secure storage policies

🧯 If You Can't Patch

  • Implement strict access controls to prevent unauthorized users from loading TA binaries.
  • Monitor system logs for TA binary loading attempts and signature verification failures.

🔍 How to Verify

Check if Vulnerable:

Check OP-TEE version: cat /sys/firmware/optee/version or examine boot logs for OP-TEE version information.

Check Version:

dmesg | grep -i 'optee' || cat /sys/firmware/optee/version 2>/dev/null || echo 'OP-TEE not detected'

Verify Fix Applied:

Verify OP-TEE version is 3.22 or higher and check that the commit e2ec831cb07ed0099535c7c140cb6338aa62816a is included in the build.

📡 Detection & Monitoring

Log Indicators:

  • TA binary signature verification failures
  • OP-TEE memory allocation errors
  • Unexpected TEE crashes or resets

Network Indicators:

  • Unusual TA binary loading attempts from unexpected sources

SIEM Query:

source="optee" AND ("signature verification failed" OR "double free" OR "memory corruption")

🔗 References

📤 Share & Export