<?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 Hi Benny,  in Intel® Software Guard Extensions (Intel® SGX)</title>
    <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Rollback-open-file-at-Protected-File-System-Library/m-p/1165041#M3025</link>
    <description>&lt;P&gt;Hi Benny,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it has been done.&lt;/P&gt;&lt;P&gt;Check out &lt;A href="https://github.com/intel/linux-sgx/blob/master/sdk/protected_fs/sgx_tprotected_fs/protected_fs_file.h#L145"&gt;the definition of `class protected_fs_file`&lt;/A&gt;, which represents an opened SGX-protected file. The class has a field named `meta_data_encrypted_t encrypted_part_plain`. This field&amp;nbsp;contains&amp;nbsp;the root hash of the merkle hash tree that protects a SGX-protected file. See definition of `meta_data_encrypted_t` is &lt;A href="https://github.com/intel/linux-sgx/blob/master/sdk/protected_fs/sgx_tprotected_fs/protected_fs_nodes.h#L80"&gt;here&lt;/A&gt;. So the root hash is always kept in memory while the SGX-protected file is opened. So swapping part of the hash tree is not possible.&lt;/P&gt;&lt;P&gt;Tate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Sep 2019 05:28:15 GMT</pubDate>
    <dc:creator>Tian__Tate</dc:creator>
    <dc:date>2019-09-19T05:28:15Z</dc:date>
    <item>
      <title>Rollback open file at Protected File System Library</title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Rollback-open-file-at-Protected-File-System-Library/m-p/1165040#M3024</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;currently, I use the&amp;nbsp;Intel Protected File System Library for my research and I have a question regarding its security guarantees. I already checked the description in the&amp;nbsp;&lt;A href="https://community.intel.com/legacyfs/online/drupal_files/managed/47/19/sgx-sdk-developer-reference-for-windows-os.pdf"&gt;Developer Reference&lt;/A&gt;&amp;nbsp;and the following &lt;A href="http://www.tatetian.io/#"&gt;blog post&lt;/A&gt;, but my question is not answered.&lt;/P&gt;&lt;P&gt;The question in short: once a file is opened, can an attacker swap the file content?&lt;BR /&gt;&lt;BR /&gt;More details:&lt;BR /&gt;According to the reference, the library does not protect against swapping of files with the same name, as only the name is checked. Therefore, it is clear that an attacker can perform a rollback attack, i.e., if a file with the name xyz was updated, an attacker can afterwards replace the updated version with the old one and the library would not notice it.&amp;nbsp;&lt;BR /&gt;The important aspect of my question is if swapping is possible if the file is already open. An example&amp;nbsp;scenario: the enclave&amp;nbsp;opens a file, reads the first 4kB chunk of the file, then does some other operations, and finally&amp;nbsp;reads another 4kB chunk. Can the enclave&amp;nbsp;be sure that an attacker did not rollback the file between the two chunk reads?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I consider this protection possible, as the enclave only has to cache the metadata node (referenced in the&amp;nbsp;&lt;A href="http://www.tatetian.io/#"&gt;blog post&lt;/A&gt;)&amp;nbsp;&amp;nbsp;on a file open and use the cached version for all reads. However, I do not know if this is done.&lt;/P&gt;&lt;P&gt;Thank you and best regards&lt;BR /&gt;Benny&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2019 15:51:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Rollback-open-file-at-Protected-File-System-Library/m-p/1165040#M3024</guid>
      <dc:creator>Benny_F_</dc:creator>
      <dc:date>2019-09-18T15:51:23Z</dc:date>
    </item>
    <item>
      <title>Hi Benny, </title>
      <link>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Rollback-open-file-at-Protected-File-System-Library/m-p/1165041#M3025</link>
      <description>&lt;P&gt;Hi Benny,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it has been done.&lt;/P&gt;&lt;P&gt;Check out &lt;A href="https://github.com/intel/linux-sgx/blob/master/sdk/protected_fs/sgx_tprotected_fs/protected_fs_file.h#L145"&gt;the definition of `class protected_fs_file`&lt;/A&gt;, which represents an opened SGX-protected file. The class has a field named `meta_data_encrypted_t encrypted_part_plain`. This field&amp;nbsp;contains&amp;nbsp;the root hash of the merkle hash tree that protects a SGX-protected file. See definition of `meta_data_encrypted_t` is &lt;A href="https://github.com/intel/linux-sgx/blob/master/sdk/protected_fs/sgx_tprotected_fs/protected_fs_nodes.h#L80"&gt;here&lt;/A&gt;. So the root hash is always kept in memory while the SGX-protected file is opened. So swapping part of the hash tree is not possible.&lt;/P&gt;&lt;P&gt;Tate&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Sep 2019 05:28:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Software-Guard-Extensions/Rollback-open-file-at-Protected-File-System-Library/m-p/1165041#M3025</guid>
      <dc:creator>Tian__Tate</dc:creator>
      <dc:date>2019-09-19T05:28:15Z</dc:date>
    </item>
  </channel>
</rss>

