<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic user_check protection for SGXSpectre in Intel® Software Guard Extensions (Intel® SGX)</title>
    <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/user-check-protection-for-SGXSpectre/m-p/1153926#M2666</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Intel has released a technical advisory about the fixes for Spectre.&amp;nbsp; However, I would like to get more insight on how to handle user_check.&amp;nbsp; So from the "Intel® Software Guard Extensions (SGX) SW Development Guidance for Potential Bounds Check Bypass (CVE-2017-5753) Side Channel Exploits" whitepaper, Intel mentioned that we have to protect user_check inputs with the following pattern:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;uint32_t enclave_function(const uint8_t* user_check_input,
uint32_t user_check_size)
{
...
//
// make sure input buffer is outside enclave
//
int SGXAPI sgx_is_outside_enclave(const void *addr, size_t
size);
if (!sgx_is_outside_enclave(user_check_input,
user_check_size)) {
// error code
...
}
else {
_mm_lfence();
...
}
...
}
&lt;/PRE&gt;

&lt;P&gt;However, how do I protect the structure that I passed with user_check when it has multiple pointers inside?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;BR /&gt;
	Elephant&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Mar 2018 09:57:38 GMT</pubDate>
    <dc:creator>Elephant</dc:creator>
    <dc:date>2018-03-15T09:57:38Z</dc:date>
    <item>
      <title>user_check protection for SGXSpectre</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/user-check-protection-for-SGXSpectre/m-p/1153926#M2666</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Intel has released a technical advisory about the fixes for Spectre.&amp;nbsp; However, I would like to get more insight on how to handle user_check.&amp;nbsp; So from the "Intel® Software Guard Extensions (SGX) SW Development Guidance for Potential Bounds Check Bypass (CVE-2017-5753) Side Channel Exploits" whitepaper, Intel mentioned that we have to protect user_check inputs with the following pattern:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;uint32_t enclave_function(const uint8_t* user_check_input,
uint32_t user_check_size)
{
...
//
// make sure input buffer is outside enclave
//
int SGXAPI sgx_is_outside_enclave(const void *addr, size_t
size);
if (!sgx_is_outside_enclave(user_check_input,
user_check_size)) {
// error code
...
}
else {
_mm_lfence();
...
}
...
}
&lt;/PRE&gt;

&lt;P&gt;However, how do I protect the structure that I passed with user_check when it has multiple pointers inside?&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;BR /&gt;
	Elephant&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Mar 2018 09:57:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/user-check-protection-for-SGXSpectre/m-p/1153926#M2666</guid>
      <dc:creator>Elephant</dc:creator>
      <dc:date>2018-03-15T09:57:38Z</dc:date>
    </item>
    <item>
      <title>If the buffer is a structure</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/user-check-protection-for-SGXSpectre/m-p/1153927#M2667</link>
      <description>&lt;P&gt;If the buffer is a structure of multiple pointers to other buffers, you will probably have to add one call to&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;&lt;STRONG&gt;sgx_is_outside_enclave&lt;/STRONG&gt; per pointer before you reference it.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2018 18:22:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/user-check-protection-for-SGXSpectre/m-p/1153927#M2667</guid>
      <dc:creator>Hoang_N_Intel</dc:creator>
      <dc:date>2018-04-16T18:22:13Z</dc:date>
    </item>
  </channel>
</rss>

