Comments (5)
The sgxsdk-2.1.2 was used
from talos.
We are currently investigating a segmentation fault with the Intel SGX SDK >= 2.0. While the code runs correctly in hardware mode, the SGX SDK generates a segfault when creating the enclave.
The code runs correctly in simulation mode with the SGX SDK v1.9.
from talos.
Here is an update on the problem.
In simulation mode, when the program is loaded, the dynamic loader loads the Intel SGX SDK libraries, and in particular the URTS library. This library makes function calls to the OpenSSL library when it is loaded (see sdk/simulation/urtssim/enclave_creator_sim.cpp
in the Intel SGX SDK). Unfortunately, as TaLoS replaces OpenSSL these calls result in an enclave creation, which fails (and leads to the segfault) at that point because the SGX SDK has not been properly initialized yet.
The simulation mode uses some OpenSSL functions to simulate instructions of SGX. We are currently looking at ways to solve this problem. One idea would be to load both the normal OpenSSL and TaLoS and make calls to the appropriate one, depending on if the calls are issued by the SGX SDK or the application.
from talos.
thanks, great!
from talos.
Commit 41584e3 fixes this issue.
The SGX SDK calls the following two OpenSSL functions when its libraries are loaded: OPENSSL_add_all_algorithms_noconf()
and ERR_load_crypto_strings()
.
Then, when the enclave is created, it calls the following functions: EVP_MD_CTX_create()
, EVP_DigestInit_ex()
, EVP_sha256()
, EVP_DigestUpdate()
, EVP_DigestFinal_ex()
and EVP_MD_CTX_destroy()
.
In simulation mode these functions can no longer be the first ones called by your application as, until the enclave has been successfully created, they will result in a call to the system OpenSSL library instead of TaLoS.
The SGX_MODE_SIM
macro, defined by the Makefile only in simulation mode, triggers this behaviour.
from talos.
Related Issues (20)
- Enclave once created is never destroyed HOT 1
- potential security issue: ecall_SSL_write using [user_check] HOT 3
- SSL/TLS Client example
- security issues due to prevalent use of [user_check] HOT 5
- memcpy warning when compiling TaLoS HOT 2
- potential security issue: ecall_SSL_read using [user_check] HOT 2
- Cannot find -lsgx_tstdcxx HOT 8
- What's the purpose of the code in /src/talso/enclaveshim HOT 5
- Deprecated function is not defined HOT 1
- Data races
- Unable to establish SSL connection when testing on the lastes version
- Dockerbuild will not start HOT 1
- Compilation of libressl not working HOT 5
- New Networking Library Drop-in Usage? HOT 2
- can not build TaLoS using clang,need help HOT 6
- The private key may be leaked to the attacker HOT 5
- verify_mode maybe be modified by the attacker HOT 1
- SSL session is leaked
- Bugs found HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from talos.