From: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Ard Biesheuvel
<ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
James Bottomley
<James.Bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
Matt Fleming
<matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>,
"linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-security-module
<linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
keyrings-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH 6/7] efi: Handle secure boot from UEFI-2.6 [ver #7]
Date: Tue, 31 Jan 2017 18:59:22 +0000 [thread overview]
Message-ID: <10454.1485889162@warthog.procyon.org.uk> (raw)
In-Reply-To: <CAKv+Gu8dnKB1sRGb3U+XB1eoA7Eyo4qSFBtPRbvGV912xPViVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> wrote:
> > UEFI-2.6 adds a new variable, DeployedMode. If it exists, this must be 1
> > if we're to engage lockdown mode.
> >
> > Reported-by: James Bottomley <James.Bottomley-d9PhHud1JfjCXq6kfMZ53/egYHeGw8Jk@public.gmane.org>
> > Signed-off-by: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>
> Interestingly, the string 'DeployedMode' appears zero times in the
> EDK2 codebase, so I wonder if it makes any sense to merge this now.
> The string 'AuditMode' does appear once, but in a comment
It's in the standard, so shouldn't we check for it?
> In any case, the logic is not entirely correct either: apologies if it
> was me who caused any confusion here, but it seems DeployedMode could
> legally be 0 or 1 while secure boot is in fact enabled. It is actually
> AuditMode that should be taken into account here, i.e., if AuditMode
> == 1, the firmware ignores invalid or missing signatures. If
> SecureBoot == 0x1, SetupMode == 0x0 and AuditMode == 0x0 (or
> non-existent), signature verification is performed regardless of the
> value (or existence) of DeployedMode.
>
> So I propose to respin this patch to treat AuditMode == 0x1 as 'secure
> boot disabled', and ignore if it is missing.
Ummm... This might conflict what said:
| Since you seem to be using this to mean "is the platform locked down?",
| this looks to be no longer complete in the UEFI 2.6 world. If
| DeployedMode == 0, even if SecureBoot == 1 and SetupMode == 0, you can
| remove the platform key by writing 1 to AuditMode and gain control of
| the secure variables. The lock down state becomes DeployedMode == 1,
| SecureBoot == 1 and SetupMode == 0
|
| See the diagram on page 1817
|
| http://www.uefi.org/sites/default/files/resources/UEFI%20Spec%202_6.pdf
Looking again at that diagram, should I be checking all four variables
(SecureBoot, SetupMode, DeployedMode and AuditMode)? And/or should I treat
audit mode differently to deployed mode?
Further, there doesn't seem to be a state in which SecureBoot is shown as
being 1.
David
next prev parent reply other threads:[~2017-01-31 18:59 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 15:13 [PATCH 0/7] efi: Pass secure boot mode to kernel [ver #7] David Howells
2017-01-31 15:13 ` [PATCH 2/7] arm/efi: Allow invocation of arbitrary runtime services " David Howells
2017-01-31 15:13 ` [PATCH 4/7] efi: Get the secure boot status " David Howells
2017-01-31 17:37 ` kbuild test robot
2017-01-31 18:04 ` kbuild test robot
[not found] ` <201702010101.EljWXBuB%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-01-31 18:24 ` Ard Biesheuvel
[not found] ` <CAKv+Gu92yTWcEguxGzMOQAvoUexCLtsVVBa2Xzz3cPPWQD9nSQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-31 18:52 ` David Howells
[not found] ` <10308.1485888776-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-01-31 20:18 ` Ard Biesheuvel
[not found] ` <CAKv+Gu_oUcbQ9CYLTentjoHWreVX7Y2-SN5BBcxZ_g4-pNG1yw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-01 21:48 ` Matt Fleming
[not found] ` <20170201214806.GO31613-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2017-02-03 2:48 ` Ye Xiaolong
[not found] ` <148587562967.4026.18171897997650345605.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-02-02 21:34 ` Matt Fleming
[not found] ` <148587558696.4026.16034622623568539004.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-01-31 15:13 ` [PATCH 1/7] x86/efi: Allow invocation of arbitrary runtime services " David Howells
2017-01-31 15:13 ` [PATCH 3/7] efi: Add SHIM and image security database GUID definitions " David Howells
2017-01-31 15:13 ` [PATCH 5/7] efi: Disable secure boot if shim is in insecure mode " David Howells
2017-01-31 15:14 ` [PATCH 6/7] efi: Handle secure boot from UEFI-2.6 " David Howells
2017-01-31 18:19 ` Ard Biesheuvel
[not found] ` <CAKv+Gu8dnKB1sRGb3U+XB1eoA7Eyo4qSFBtPRbvGV912xPViVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-31 18:59 ` David Howells [this message]
2017-02-01 10:02 ` David Howells
[not found] ` <10454.1485889162-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-02-01 10:15 ` Ard Biesheuvel
2017-02-01 12:33 ` David Howells
2017-02-01 14:44 ` Ard Biesheuvel
2017-02-01 15:00 ` David Howells
[not found] ` <23750.1485961217-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-02-01 15:02 ` Ard Biesheuvel
[not found] ` <CAKv+Gu9ACE23ZMcQN3NpZ_N-CWzg=N6qFVu3_UruH0miPe=izA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-02 21:36 ` Matt Fleming
[not found] ` <20170202213626.GQ31613-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
2017-02-02 21:45 ` Ard Biesheuvel
2017-01-31 15:14 ` [PATCH 7/7] efi: Print the secure boot status in x86 setup_arch() " David Howells
[not found] ` <148587565838.4026.2835771993519594392.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-02-03 16:07 ` Ard Biesheuvel
2017-02-03 16:21 ` David Howells
2017-02-03 16:23 ` Ard Biesheuvel
[not found] ` <CAKv+Gu-=-piH7FQF92T6Yn4KUHLQ-C4CtexWe8D27Tuc3h8KdA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-03 16:27 ` David Howells
2017-02-03 16:29 ` David Howells
2017-02-03 16:29 ` Ard Biesheuvel
[not found] ` <CAKv+Gu-O+nWmu2s8bCrANJs0JNE4QgaM=ZkSa+bu60C=-6T-Lg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-03 17:00 ` Ard Biesheuvel
[not found] ` <CAKv+Gu88XuQAb7aSmJ=b+u5LDfkE=dgWMwnKUd0U=qKSQXxdrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-03 17:19 ` David Howells
2017-01-31 16:45 ` [PATCH 0/7] efi: Pass secure boot mode to kernel " Ard Biesheuvel
2017-01-31 17:04 ` David Howells
[not found] ` <8425.1485882280-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org>
2017-01-31 18:20 ` Ard Biesheuvel
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-all 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=10454.1485889162@warthog.procyon.org.uk \
--to=dhowells-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=James.Bottomley-JuX6DAaQMKPCXq6kfMZ53/egYHeGw8Jk@public.gmane.org \
--cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=keyrings-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org \
/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