public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Park, Kyung Min" <kyung.min.park@intel.com>
To: Laszlo Ersek <lersek@redhat.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: Secureboot enable with OVMF
Date: Sun, 16 Dec 2018 21:49:49 +0000	[thread overview]
Message-ID: <3658BA65DD26AF4BA909BEB2C6DF618196278FC6@ORSMSX102.amr.corp.intel.com> (raw)
In-Reply-To: <8ccd187d-cffb-ef30-2be9-e48f32a85fec@redhat.com>

This works. Thanks!!

-----Original Message-----
From: Laszlo Ersek [mailto:lersek@redhat.com] 
Sent: Thursday, December 13, 2018 2:49 AM
To: Park, Kyung Min <kyung.min.park@intel.com>
Cc: edk2-devel@lists.01.org
Subject: Re: [edk2] Secureboot enable with OVMF

On 12/13/18 02:25, Park, Kyung Min wrote:
> Hi,
> 
> I'm trying to enable the secureboot with OVMF. I followed the steps as below.
> But When I executed LockDown.efi, it gives me an error which says, "Failed to enroll PK: 26".
> According to UEFI spec, the 26 means EFI_SECURITY_VIOLATION, but I don't understand why I got this error.
> Before I ran the LockDown.efi, the secureboot was disabled by default and the PK key was not enrolled.
> 
> 1. Build OVMF with secureboot enable
> https://wiki.ubuntu.com/UEFI/EDK2

Please know that, if you build OVMF with *just* SECURE_BOOT_ENABLE, but without SMM_REQUIRE, then a malicious guest OS may modify the pflash chip with direct hardware access that contains the authenticated UEFI variables. In other words, a malicious guest OS may circumvent Secure Boot.

If that's OK for your use case (it could be), then it's OK to use just SECURE_BOOT_ENABLE; but it should be a conscious decision.

Regarding SMM_REQUIRE, please see OvmfPkg/README, section "SMM support".

> 2. Generate/Execute LockDown.efi to enroll PK/KEK/DB keys 
> git://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git
> 
> I would appreciate any useful information about this error.

You'll have to dig into LockDown.efi for that. If you are convinced LockDown.efi does the right thing, then you'll have to add debug messages to the edk2 stack that handles authenticated variables (the variable driver, some SecurityPkg / CryptoPkg libraries, etc). This is usually quite time consuming.

As an alternative, you might be able to use "/usr/share/edk2/ovmf/EnrollDefaultKeys.efi", from the "edk2-ovmf"
subpackage package, from

  https://koji.fedoraproject.org/koji/packageinfo?packageID=16183

(You can find the source code in the SRPM.)

Thanks,
Laszlo

      reply	other threads:[~2018-12-16 21:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13  1:25 Secureboot enable with OVMF Park, Kyung Min
2018-12-13 10:49 ` Laszlo Ersek
2018-12-16 21:49   ` Park, Kyung Min [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3658BA65DD26AF4BA909BEB2C6DF618196278FC6@ORSMSX102.amr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox