<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10665</bug_id>
          
          <creation_ts>2016-11-15 12:47:12 +0000</creation_ts>
          <short_desc>swupd + tar extraction errors + IMA</short_desc>
          <delta_ts>2016-12-08 17:40:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Other YP Layers</product>
          <component>meta-swupd</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Patrick Ohly">patrick.ohly</reporter>
          <assigned_to name="Patrick Ohly">patrick.ohly</assigned_to>
          <cc>richard.purdie</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68322</commentid>
    <comment_count>0</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2016-11-15 12:47:12 +0000</bug_when>
    <thetext>When IMA is active, unpacking file or pack-from tar archives fails when the content include files where security.ima is set to a hash. That&apos;s because Linux kernel commit c68ed80 &quot;ima: limit file hash setting by user to fix and log
modes&quot; prevents that based on the assumption that it isn&apos;t necessary.

That assumption is wrong (see [Linux-ima-user] copying files with security.ima xattr). In the swupd/bsdtar case, bsdtar doesn&apos;t know that setting the security.ima xattr is redundant. In fact, it is useful - probably faster than local hashing.

Older swupd-client ignored tar errors, 3.6.0 doesn&apos;t. Unpacking pack-from archives in download_pack() just fails (no errors) and the probably falls back to downloading individual files (untested).

Unpacking individual files in untar_full_download() claims to ignore errors, but the error isn&apos;t cleared and therefore errors are still fatal.

Several changes should be done:
- fix untar_full_download() to behave as intended
- revert the problematic c68ed80, which then will also make pack-from archives work</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68644</commentid>
    <comment_count>1</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2016-11-28 19:26:36 +0000</bug_when>
    <thetext>Kernel patch is getting reverted upstream and meta-integrity has a pending patch which also reverts it in older kernels.

The swupd team decided to keep tar errors as fatal, but that&apos;s fine once the kernel patch is reverted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68956</commentid>
    <comment_count>2</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2016-12-08 17:40:01 +0000</bug_when>
    <thetext>Resolved in meta-intel-iot-security baac71e.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>