intel / linux-sgx

Intel SGX for Linux*
https://www.intel.com/content/www/us/en/developer/tools/software-guard-extensions/linux-overview.html
Other
1.34k stars 548 forks source link

Sgx Memory #254

Open khanhct-viosoft opened 6 years ago

khanhct-viosoft commented 6 years ago

Hi all, I have a issue related sgx memory. Please help me to fix it.

andyzyb commented 6 years ago

I guess the _master_key is not Null terminated. Should be "new unsigned char[65]; memset(_master_key, 0, 65)"?

khanhct-viosoft commented 6 years ago

Thank @andyzyb But it don't work. I got master_key=036de217f5add709d5b2bcd0b8a0714fd656b76eaa8bb698e7448394f032e59d��k�p*

andyzyb commented 6 years ago

What is LL_CRITICAL? Please make sure when you pass the buffer to outside Enclave, it also be NULL terminated and pass the last "\0" out as well. It looks the print goes beyond the buffer boundary.

khanhct-viosoft commented 6 years ago

Thank @andyzyb it work. It is because of LL_CRITICAL.