OP-TEE
cpe:2.3:o:op-tee:op-tee_os:*:*:*:*:*:*:*
- >= 3.16.0, < 4.11.0
A user-after-free (UAF) race condition vulnerability has been identified in OP-TEE versions 3.16.0 prior to 4.11.0. This vulnerability occurs in the shared memory teardown process of the FF-A framework, specifically within OP-TEE's Secure Partition Manager (SPMC) handling for Secure EL0 (S-EL0) Secure Partitions (SPs). The issue arises because the function responsible for removing shared memory entries does not properly synchronize access, allowing one thread to free memory while another thread is still using it. As a result, the first thread can inadvertently access freed memory, leading to potential memory corruption and information leakage in the secure world.
Exploitation of this vulnerability allows for a race condition where a non-secure flow can cause the secure world to dereference freed memory, leading to memory corruption and potential information leakage if the freed objects are accessed by the secure world.
The vulnerability can be reproduced by configuring OP-TEE to act as a Secure Partition Manager for S-EL0 SPs. When this configuration is active, the FF-A function calls `FFA_MEM_SHARE` or `FFA_MEM_LEND` can be used to trigger the vulnerable memory management functions. The `sp_mem_remove()` function will then free memory without proper locking, creating a race condition that can be exploited.
Users can upgrade to OP-TEE version 4.11.0 or later, where this vulnerability has been fixed.
Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.