-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The private key may be leaked to the attacker #33
Comments
Hi. I guess the big question is why would the untrusted code call |
Hi,dear sir Thanks for your quick reply. So if we use TaLos in production,there might be a security issue if the attacker try to obtain the private key by directly invoking so can we just directly remove this ECALL before running TaLos in production? |
Yes, you can remove it. You should probably also remove the printf ecall. It's useful for debugging, but it could potentially expose sensitive information to the untrusted world. |
@jmp0x7c00 I would advise you not to use this project in production. A couple of years ago we have developed 3 different proof-of-concept exploits that target the talos enclave from a malicious host process. I believe the issues we exploited were not fixed. Due to the prevalence of @plaublin Don't you think it would be good to put a notice somewhere that this code is not fit for production? |
Similar to this issue reported by @jmp0x7c00, ecall_SSL_CTX_use_PrivateKey() copies the private key to the untrusted space through the call chain: ecall_SSL_CTX_use_PrivateKey()->SSL_CTX_use_PrivateKey()->ssl_set_pkey(). |
Hello, sir
I found there maybe a security issue here and need your confirm.
related source code:
In
ecall_SSL_get_privatekey
, the private key is copied to the memory area pointed to bypkey
, but sincepkey
isuser_check
, and points to untrusted memory outside the enclave, so an attacker can monitor its content to obtain the private key.The text was updated successfully, but these errors were encountered: