<?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>9878</bug_id>
          
          <creation_ts>2016-07-05 09:53:11 +0000</creation_ts>
          <short_desc>feature request: secure boot layer</short_desc>
          <delta_ts>2017-07-20 18:10:47 +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>layers</component>
          <version>unspecified</version>
          <rep_platform>Other</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>High</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.4 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mei Yeen Ng">mei.yeen.ng</reporter>
          <assigned_to name="California Sullivan">california.l.sullivan</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>mikko.ylinen</cc>
    
    <cc>patrick.ohly</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>radzy</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>63650</commentid>
    <comment_count>0</comment_count>
    <who name="Mei Yeen Ng">mei.yeen.ng</who>
    <bug_when>2016-07-05 09:53:11 +0000</bug_when>
    <thetext>It would be great to have a layer supporting UEFI secure boot (also known as verified boot). The layer enables any images to be build with
- shim v0.8 as the first bootloader
- grub v2.02~beta3 
- generates signed kernel, grub, and shim with pesign
- populate ISO and HDDIMG with signed packages</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63774</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2016-07-08 21:20:34 +0000</bug_when>
    <thetext>There is an existing layer called meta-measuered [1] which provides some of this, there is also some work in Ostro-os that provides signed packages (or blobs), one of the problems with Grub v2 is that it&apos;s a GPLv3 Licence.

This may end up being an enhancement that generates additional enhancements, I am not sure this is for 2.2 timeframe, so moving it to 2.3

[1] https://layers.openembedded.org/layerindex/branch/master/layer/meta-measured/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67885</commentid>
    <comment_count>2</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2016-11-03 10:20:24 +0000</bug_when>
    <thetext>Is the request to enable exactly the described way of doing secure boot, or some kind of secure boot? Do you want to use measured boot?

I am asking because Ostro uses a different kind of signed UEFI boot. Talk with Mikko and/or Igor if you are interested.

Also related: do you need integrity protection of the rootfs? This can be done either file-based (IMA/EVM, as in meta-intel-iot-security/meta-integrity) or block-based (for example, dm-crypt, dm-integrity or dm-verity). That also has implications for the update mechanism.

Here&apos;s an introduction to IMA/EVM, which contains a comparison against dm-verity and dm-integrity:

http://events.linuxfoundation.org/sites/events/files/slides/Integrity_Protection_LinuxCon_Europe_2013_0.pdf

dm-verity is only suitable for read-only partitions and thus
incompatible with swupd, but seems to have better performance than the other methods. It&apos;s used in Android.

dm-integrity and dm-crypt both could work, but the performance in that
comparison was even worse than IMA/EVM.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67889</commentid>
    <comment_count>3</comment_count>
    <who name="Igor Stoppa">igor.stoppa</who>
    <bug_when>2016-11-03 10:37:36 +0000</bug_when>
    <thetext>I&apos;m curious about ISO format.
I thought that nowadays it was almost a relic, when it comes to booting a machine.
What&apos;s the use case?

About the combo EFI binary used in Ostro vs the multi-stage EFI loading:
one benefit of the single binary is that it relies solely on the EFI BIOS for authenticating and loading into memory everything that is needed up to and included the initramfs.

WRT choosing the protection method for the rootfs, I would also like to add that it should be considered if offline attacks (with the device unpowered) are expected or not - iow are there an hostile environment and/or user?
Ex: digibox implementing DRM decoding.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68463</commentid>
    <comment_count>4</comment_count>
    <who name="Patrick Ohly">patrick.ohly</who>
    <bug_when>2016-11-21 18:50:15 +0000</bug_when>
    <thetext>Cal, how do you intend to address the &quot;signed packages&quot; part of the feature request?

Presumably the requirement is for the kernel to only load trusted files (kernel modules, executables, data files, etc.).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68464</commentid>
    <comment_count>5</comment_count>
    <who name="California Sullivan">california.l.sullivan</who>
    <bug_when>2016-11-21 19:02:25 +0000</bug_when>
    <thetext>I haven&apos;t decided yet - I only put in a time estimate because I keep getting bug cleanup requests and this bug was missing an estimate.

I have really only just begun looking into this - what options we have available for securely booting (UEFI secure boot, measured boot, trusted boot), and looking at what has already been done (such as the above meta-measured, and Ostro&apos;s secure boot docs), and have not started any implementation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74942</commentid>
    <comment_count>6</comment_count>
    <who name="California Sullivan">california.l.sullivan</who>
    <bug_when>2017-07-11 21:42:08 +0000</bug_when>
    <thetext>I have been working on taking the single binary approach from refkit and integrating it into meta-intel. See here: https://lists.yoctoproject.org/pipermail/meta-intel/2017-July/004821.html

This allows you to have a kernel, initramfs, and command line built into a single binary. For secure boot, you then just need to sign it with the keys that you would be embedding into the firmware. See do_uefiapp_sign here: https://lists.yoctoproject.org/pipermail/meta-intel/2017-July/004823.html

I&apos;m also wanting to add another option using shim + systemd-boot, similar to what Windriver is doing here: https://github.com/jiazhang0/meta-efi-secure-boot</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75204</commentid>
    <comment_count>7</comment_count>
    <who name="California Sullivan">california.l.sullivan</who>
    <bug_when>2017-07-20 18:10:47 +0000</bug_when>
    <thetext>The single blob method is complete. Thanks Patrick, Mikko, and others for the help. The other methods using the real systemd-boot bootloader is being split into its own bug, as that will require more investigation to do correctly.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>