From: Mimi Zohar <zohar@linux.vnet.ibm.com>
To: Matthew Garrett <mjg@redhat.com>
Cc: linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org, linux-efi@vger.kernel.org
Subject: Re: [PATCH 07/11] kexec: Disable in a secure boot environment
Date: Wed, 05 Sep 2012 17:13:49 -0400 [thread overview]
Message-ID: <1346879629.2054.22.camel@falcor.watson.ibm.com> (raw)
In-Reply-To: <1346774117-2277-8-git-send-email-mjg@redhat.com>
On Tue, 2012-09-04 at 11:55 -0400, Matthew Garrett wrote:
> kexec could be used as a vector for a malicious user to use a signed kernel
> to circumvent the secure boot trust model. In the long run we'll want to
> support signed kexec payloads, but for the moment we should just disable
> loading entirely in that situation.
>
> Signed-off-by: Matthew Garrett <mjg@redhat.com>
> ---
> kernel/kexec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/kexec.c b/kernel/kexec.c
> index 0668d58..48852ec 100644
> --- a/kernel/kexec.c
> +++ b/kernel/kexec.c
> @@ -944,7 +944,7 @@ SYSCALL_DEFINE4(kexec_load, unsigned long, entry, unsigned long, nr_segments,
> int result;
>
> /* We only trust the superuser with rebooting the system. */
> - if (!capable(CAP_SYS_BOOT))
> + if (!capable(CAP_SYS_BOOT) || !capable(CAP_SECURE_FIRMWARE))
> return -EPERM;
>
> /*
Normally capabilities provide additional permissions. So if you don't
have the capability, an errno is returned. CAP_SYS_BOOT is a good
example. With CAP_SECURE_FIRMWARE, it reads backwards - if not
CAP_SECURE_FIRMWARE, return error. I think you want to invert the name
to CAP_NOT_SECURE_FIRMWARE, CAP_NOT_SECURE_BOOT or perhaps
CAP_UNSECURED_BOOT.
Mimi
next prev parent reply other threads:[~2012-09-05 21:16 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-04 15:55 [RFC] First attempt at kernel secure boot support Matthew Garrett
2012-09-04 15:55 ` [PATCH 01/11] Secure boot: Add new capability Matthew Garrett
2012-09-04 15:55 ` [PATCH 02/11] PCI: Lock down BAR access in secure boot environments Matthew Garrett
2012-10-01 21:00 ` Pavel Machek
2012-09-04 15:55 ` [PATCH 03/11] x86: Lock down IO port " Matthew Garrett
2012-09-04 16:16 ` Alan Cox
2012-09-04 16:16 ` Matthew Garrett
2012-09-04 15:55 ` [PATCH 04/11] ACPI: Limit access to custom_method Matthew Garrett
2012-09-04 15:55 ` [PATCH 05/11] asus-wmi: Restrict debugfs interface Matthew Garrett
2012-09-04 16:12 ` Alan Cox
2012-09-04 16:13 ` Matthew Garrett
2012-09-04 15:55 ` [PATCH 06/11] Restrict /dev/mem and /dev/kmem in secure boot setups Matthew Garrett
2012-09-04 15:55 ` [PATCH 07/11] kexec: Disable in a secure boot environment Matthew Garrett
2012-09-04 20:13 ` Eric W. Biederman
2012-09-04 20:22 ` Matthew Garrett
2012-09-04 21:13 ` Eric W. Biederman
2012-09-04 21:27 ` Matthew Garrett
2012-09-04 22:12 ` Eric W. Biederman
2012-09-04 23:25 ` Matthew Garrett
2012-09-05 4:33 ` Eric W. Biederman
2012-09-05 5:16 ` Matthew Garrett
2012-09-05 7:00 ` Eric W. Biederman
2012-09-05 7:03 ` Matthew Garrett
2012-09-04 21:39 ` Alan Cox
2012-09-04 21:40 ` Matthew Garrett
2012-09-05 15:43 ` Roland Eggner
2012-09-05 15:46 ` Matthew Garrett
2012-09-05 21:13 ` Mimi Zohar [this message]
2012-09-05 21:41 ` Matthew Garrett
2012-09-05 21:49 ` Eric Paris
2012-09-04 15:55 ` [PATCH 08/11] Secure boot: Add a dummy kernel parameter that will switch on Secure Boot mode Matthew Garrett
2012-09-04 15:55 ` [PATCH 09/11] efi: Enable secure boot lockdown automatically when enabled in firmware Matthew Garrett
2012-09-04 15:55 ` [PATCH 10/11] acpi: Ignore acpi_rsdp kernel parameter in a secure boot environment Matthew Garrett
2012-09-04 16:30 ` Shuah Khan
2012-09-04 16:38 ` Matthew Garrett
2012-09-04 16:44 ` Shuah Khan
2012-09-04 20:37 ` Alan Cox
2012-09-04 20:37 ` Matthew Garrett
2012-09-04 20:50 ` Josh Boyer
2012-09-04 15:55 ` [PATCH 11/11] SELinux: define mapping for new Secure Boot capability Matthew Garrett
2012-09-04 16:08 ` [RFC] First attempt at kernel secure boot support Alan Cox
2012-09-04 16:12 ` Matthew Garrett
2012-10-01 21:07 ` Pavel Machek
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=1346879629.2054.22.camel@falcor.watson.ibm.com \
--to=zohar@linux.vnet.ibm.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=mjg@redhat.com \
--subject='Re: [PATCH 07/11] kexec: Disable in a secure boot environment' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).