All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michal Suchánek" <msuchanek@suse.de>
To: dja@axtens.net, grub-devel@lists.gnu.org
Subject: [PATCH 0/3] Add support for signing grub with an appended signature
Date: Fri, 16 Oct 2020 13:20:38 +0200	[thread overview]
Message-ID: <20201016132038.4f48eea9@naga.suse.cz> (raw)
In-Reply-To: 20200821023720.13747-1-dja@axtens.net

Hello,

It has been pointed out in the plumbers session that the ELF note will
cause problems when user wants to add additional signature.

The normal appended signature has only one size information - in the
footer at the end of the binary, and that is not part of the signed
data. So if you want to add additional signature it if possible to
expand the room for the signature data.

In contrast the ELF note size is present in the ELF header which is
also signed. This does not allow adjusting the size of the signature
data once the binary is signed.

A simpler scheme would be for grub-install to parse the signature
footer, split-off the signature, write the ELF binary at the start of
the PReP partition, and the signature at the end. Then the grub
signature can use exactly same format as the kernel and modules.

The disadvantage is that for signed grub dd is no longer an alternative
to grub-install.

There was also concern about distinguishing signed and un-signed grub.
That is that writing an un-signed grub might lease a stale signature
leading to an error.

However, secure boot is something that should be enabled or disabled in
firmware settings, and not triggered by the PPeP partition containing a
signature. 

When secure boot is enabled checking the grub signature is required and
un-signed grub is invalid. When secure boot is disabled the signature
is irrelevant and stale signature should not cause any error.

grub-install can also remove the signature magic when installing
un-signed grub for consistency. Users using dd to install un-signed
grub might still have an old signature at the end of the partition.

Thanks

Michal


             reply	other threads:[~2020-10-16 14:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 11:20 Michal Suchánek [this message]
     [not found] ` <871rhuwi80.fsf@dja-thinkpad.axtens.net>
2020-10-19 23:18   ` [PATCH 0/3] Add support for signing grub with an appended signature Daniel Axtens
2020-10-22  4:25   ` Daniel Axtens
2020-10-22 11:14     ` Michal Suchánek
2020-10-23  5:33       ` Daniel Axtens
2020-11-04 18:04         ` Michal Suchánek
  -- strict thread matches above, loose matches on Subject: below --
2020-08-21  2:37 Daniel Axtens
2020-09-23 15:11 ` Daniel Axtens

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=20201016132038.4f48eea9@naga.suse.cz \
    --to=msuchanek@suse.de \
    --cc=dja@axtens.net \
    --cc=grub-devel@lists.gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.