<?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>14609</bug_id>
          
          <creation_ts>2021-10-21 20:16:35 +0000</creation_ts>
          <short_desc>Unable to build on a host with FIPS mode enabled</short_desc>
          <delta_ts>2022-06-03 21:47:11 +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>OE-Core</product>
          <component>oe-core other</component>
          <version>3.2.5</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>minor</bug_severity>
          <target_milestone>4.1 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Hatle">mark.hatle</reporter>
          <assigned_to name="Mark Hatle">mark.hatle</assigned_to>
          <cc>randy.macleod</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>91817</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2021-10-21 20:16:35 +0000</bug_when>
    <thetext>When trying to build on a host system with FIPS mode enabled, various points in the build will fail with error messages similar to:

Command: ... returned non-zero exit status 1.
Subprocess output:error: Failed to initialize NSS library.

Note, the above mentions the NSS library, but similar messages have come from other components including OpenSSL, and even tools like md5sum, sha256sum, etc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91818</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2021-10-21 20:21:36 +0000</bug_when>
    <thetext>I&apos;ve done basic investigation of the issue (on gatesgarth / 3.2) and the cause seems to be based on two different items:

1) Host libraries/host tools
   * A number of native components use host libraries for basic functionality.  These components would be restricted, by the FIPS enablement, from doing certain non-FIPS hash and cryptographic operations.

   * Some host system applications are disabled in FIPS mode, or have limits to various functionality.  This MAY include md5sum, sha256sum, openssl, and even python modules.


2) Built (native) recipes that have cryptographic resources may check the host&apos;s FIPS enablement and act accordingly.


The item #2 above is &quot;easy&quot; to fix, remove all of the checks in native components for host FIPS functionality.  (But it will be like &apos;peeling an onion&apos; as the checks are both compile and runtime.

Item #1 the items need to be identified, and suitable &quot;native&quot; alternatives found.


My original resource estimate was for one person it would take 2+ weeks of development, plus coordinating with the community, as well as additional time to generate appropriate test (host) configurations and create the tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91838</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-10-28 14:35:56 +0000</bug_when>
    <thetext>Mark, Is this also affecting master? Do you have anyone to work on it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91848</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2021-10-28 15:56:47 +0000</bug_when>
    <thetext>I bricked my test system, so I&apos;ve not been able to verify it on master.

The key is that it&apos;s not just NSS, it&apos;s any host system cryptographic libraries, and some of the ones we build (native) when executed check the FIPS flag and go into a reduced functionality mode causing these types of failures.

So I expect master (honister) is also broken.  I had tried to fix this in gatesgarth and failed, since fixing one thing triggered then next and so on.

I don&apos;t have any resources to work on it at this point, but I do intend to try to reproduce it on master for confirmation it&apos;s still an issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93397</commentid>
    <comment_count>4</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2022-06-03 21:47:11 +0000</bug_when>
    <thetext>I&apos;ve tested this recently and other then a few recipes, everything appears to be working as of Kirkstone.  Resolving.

Fixes involved in this are:

(yocto commit IDs)

d895863af12e15bebd9fa0640290d9a649ece82b

e9cc9772f277cbb270f52916b21d94abdaa1467f</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>