-
Notifications
You must be signed in to change notification settings - Fork 20
potential security issue: ecall_SSL_write using [user_check] #13
Copy link
Copy link
Closed
Description
TaLoS/src/talos/enclaveshim/enclave.edl
Line 87 in 43d5890
| public int ecall_SSL_write([user_check] SSL *ssl,[user_check] const void *buf,int num); |
This edl definition uses [user_check] for pointer argument "const void *buf". It introduces the vulnerability to allow attackers to retrieve the secret info inside enclave, because SGX boundary check has been skipped for this pointer.
Potential attack methodology: with help of another ecall function, ecall_SSL_read, one can pass a pointer pointing an address inside SGX enclave to ecall_SSL_write, then use ecall_SSL_read to read the content of enclave through SSL communication.
The simple fix will be to change edl attribute for "const void *buf" in ecall_SSL_write from [user_check] to [in], or to add boundary-checking code in the applications, such as using SGX-provided function "sgx_is_outside_enclave" like here.
Please feel free to contact me if you want to discuss this issue, and I can explain it more by demonstrating a POC exploring this vulnerability.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels