Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: James Morris <jmorris@namei.org>
To: Matthew Garrett <matthewgarrett@google.com>
Cc: Jiri Bohac <jbohac@suse.cz>,
	linux-api@vger.kernel.org, kexec@lists.infradead.org,
	linux-kernel@vger.kernel.org, Matthew Garrett <mjg59@google.com>,
	David Howells <dhowells@redhat.com>,
	linux-security-module@vger.kernel.org
Subject: Re: [PATCH V34 09/29] kexec_file: Restrict at runtime if the kernel is locked down
Date: Thu, 27 Jun 2019 14:59:09 +1000 (AEST)	[thread overview]
Message-ID: <alpine.LRH.2.21.1906271423070.16512@namei.org> (raw)
In-Reply-To: <20190622000358.19895-10-matthewgarrett@google.com>

On Fri, 21 Jun 2019, Matthew Garrett wrote:

> From: Jiri Bohac <jbohac@suse.cz>
> 
> When KEXEC_SIG is not enabled, kernel should not load images through
> kexec_file systemcall if the kernel is locked down.

This is not a criticism of the patch but a related issue which I haven't 
seen discussed (apologies if it has).

If signed code is loaded into ring 0, verified by the kernel, then 
executed, you still lose your secure/trusted/verified boot state. If the 
currently running kernel has been runtime-compromised, any signature 
verification performed by the kernel cannot be trusted.

This problem is out of scope for the lockdown threat model (which 
naturally cannot include a compromised kernel), but folk should be aware 
that signature-verified kexec does not provide equivalent assurance to a 
full reboot on a secure-boot system.

Potential mitigations here include runtime integrity verification of the
kernel via a separate security monitor (hypervisor, SMM, TEE etc.) or some
kind of platform support for kexec verification.


-- 
James Morris
<jmorris@namei.org>


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  parent reply	other threads:[~2019-06-27  4:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190622000358.19895-1-matthewgarrett@google.com>
2019-06-22  0:03 ` [PATCH V34 06/29] kexec_load: Disable at runtime if the kernel is locked down Matthew Garrett
2019-06-22 23:52   ` Kees Cook
2019-06-22  0:03 ` [PATCH V34 07/29] Copy secure_boot flag in boot params across kexec reboot Matthew Garrett
2019-06-22 23:53   ` Kees Cook
2019-06-22  0:03 ` [PATCH V34 08/29] kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE Matthew Garrett
2019-06-24  2:01   ` Dave Young
2019-06-25  2:35     ` Dave Young
2019-06-22  0:03 ` [PATCH V34 09/29] kexec_file: Restrict at runtime if the kernel is locked down Matthew Garrett
2019-06-22 23:54   ` Kees Cook
2019-06-27  4:59   ` James Morris [this message]
2019-06-27 15:28     ` Matthew Garrett
2019-06-27 18:14       ` James Morris
2019-06-27 23:17         ` Matthew Garrett

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=alpine.LRH.2.21.1906271423070.16512@namei.org \
    --to=jmorris@namei.org \
    --cc=dhowells@redhat.com \
    --cc=jbohac@suse.cz \
    --cc=kexec@lists.infradead.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=matthewgarrett@google.com \
    --cc=mjg59@google.com \
    /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