windows enclave error while CreateEnclave

-1

I try to use CreateEnclave() on windows 10 (https://docs.microsoft.com/en-us/windows/win32/api/enclaveapi/nf-enclaveapi-createenclave)

I get the current process handle with GetCurrentProcess() (https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getcurrentprocess), which give me 0xFFFFFFFF

Then i allocate a memory region with VirtualAlloc() in order to have an area for the ENCLAVE_CREATE_INFO_SGX structure or ENCLAVE_CREATE_INFO_VBS structure.

By the way, i don't find the difference between both (probably don't look well the msdn ..).

When i finally call the CreateEnclave(), i got an Exception_Access_Violation (0xC0000005) and the EIP pointer is stuck on the popad instruction which seems a strange place for an Access Violation.

Maybe the program cannot push on the stack ?? But why ??

By the way, i tried with ENCLAVE_CREATE_INFO_SGX and ENCLAVE_CREATE_INFO_VBS structure with no luck. And i allow the debugging by specifying Flags=1 in the ENCLAVE_CREATE_INFO_VBS structure.

If you have any any, please let me know.

Thanks

c++
assembly
access-violation
enclave
asked on Stack Overflow Feb 12, 2021 by ginko

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0