Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1lRF2L-0000LN-Ag for mharc-grub-devel@gnu.org; Tue, 30 Mar 2021 10:08:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRF2K-0000Id-8J for grub-devel@gnu.org; Tue, 30 Mar 2021 10:08:04 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]:35822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lRF2I-0004FX-Kl for grub-devel@gnu.org; Tue, 30 Mar 2021 10:08:04 -0400 Received: by mail-pl1-x62d.google.com with SMTP id e14so6228232plj.2 for ; Tue, 30 Mar 2021 07:08:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aauYTHFrc/lUt09b4IwB6LauTTgDeydF6+CWerjvPeY=; b=KMRxqRdDbR28uD+pfhLbEqE56t44Sqt1k1boSjl1DgAtnWcC8hfdSfeKI/zZw4rEgw MsCeVDZTvR9+iiNqvb4+ZSuTEM0b+bpB4IrOQSv3aw7VtEYfsoR6Kt1664FKijDhBr4N 7UHgmU8lVhYaZdcukajhMR9zubQG2Yim80Ukc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aauYTHFrc/lUt09b4IwB6LauTTgDeydF6+CWerjvPeY=; b=Rs+Lf5U1QdONDvLCLA0lgcy2aYlX2/hfLJSUtW330vt65ZRRas8CUfMMXD1DNVlax3 NWqEiufexQQpY+wpFLUFmCb0Mz5D+we4Gc2UNOx7UCs1jWBsleyU/Leq93HpNTape0Xp TGKOAiQ6RXOdk8o3x0uNAb7qEMeaQpB4gVb85Fs1lkpCtEoSsrCE9VlGGfvZX1cUJmDj dL7hiJ7mG0+PXtWsh1RhP8qaAchisUtEYFZ2dmfwiS13rJhM9Bvjg8gZTvA1PK6n2GIP kQrZclFNBPKRA/Rxg84fmfpX/NCBFIaGrrSBUt7DFqxlOo8pI0l96DHkm2j4SdDOBoCZ 5clw== X-Gm-Message-State: AOAM531mJ3mXUkjZbusn1LKxUisikNUABTevLpUe+xRKsTYbz7b/uLvK iFTlJ2oyM5qpcadVHVZebmiYOY6Z8tElag== X-Google-Smtp-Source: ABdhPJwl/SiYwFgSroperk6cpbe8cDnP5ubMCLtI2c5x6SgOvHEV6h3cuhixjA/IajuJHppj7oaxxw== X-Received: by 2002:a17:90a:cf8f:: with SMTP id i15mr4573201pju.22.1617113280949; Tue, 30 Mar 2021 07:08:00 -0700 (PDT) Received: from localhost (2001-44b8-111e-5c00-cc4e-3d4e-f51c-bb52.static.ipv6.internode.on.net. [2001:44b8:111e:5c00:cc4e:3d4e:f51c:bb52]) by smtp.gmail.com with ESMTPSA id 38sm20153626pgk.30.2021.03.30.07.07.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Mar 2021 07:08:00 -0700 (PDT) From: Daniel Axtens To: grub-devel@gnu.org Cc: rashmica.g@gmail.com, alastair@d-silva.org, Daniel Axtens Subject: [PATCH 02/19] docs/grub: Document signing grub under UEFI Date: Wed, 31 Mar 2021 01:07:27 +1100 Message-Id: <20210330140744.176698-3-dja@axtens.net> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210330140744.176698-1-dja@axtens.net> References: <20210330140744.176698-1-dja@axtens.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=dja@axtens.net; helo=mail-pl1-x62d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2021 14:08:04 -0000 Before adding information about how grub is signed with an appended signature scheme, it's worth adding some information about how it can currently be signed for UEFI. Signed-off-by: Daniel Axtens --- docs/grub.texi | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/docs/grub.texi b/docs/grub.texi index eeb3118ebdec..b1a0e2761691 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -5790,6 +5790,7 @@ environment variables and commands are listed in the same order. * Secure Boot Advanced Targeting:: Embedded information for generation number based revocation * Measured Boot:: Measuring boot components * Lockdown:: Lockdown when booting on a secure setup +* Signing GRUB itself:: Ensuring the integrity of the GRUB core image @end menu @node Authentication and authorisation @@ -5868,7 +5869,7 @@ commands. GRUB's @file{core.img} can optionally provide enforcement that all files subsequently read from disk are covered by a valid digital signature. -This document does @strong{not} cover how to ensure that your +This section does @strong{not} cover how to ensure that your platform's firmware (e.g., Coreboot) validates @file{core.img}. If environment variable @code{check_signatures} @@ -6030,6 +6031,25 @@ be restricted and some operations/commands cannot be executed. The @samp{lockdown} variable is set to @samp{y} when the GRUB is locked down. Otherwise it does not exit. +@node Signing GRUB itself +@section Signing GRUB itself + +To ensure a complete secure-boot chain, there must be a way for the code that +loads GRUB to verify the integrity of the core image. + +This is ultimately platform-specific and individual platforms can define their +own mechanisms. However, there are general-purpose mechanisms that can be used +with GRUB. + +@section Signing GRUB for UEFI secure boot + +On UEFI platforms, @file{core.img} is a PE binary. Therefore, it can be signed +with a tool such as @command{pesign} or @command{sbsign}. Refer to the +suggestions in @pxref{UEFI secure boot and shim} to ensure that the final +image works under UEFI secure boot and can maintain the secure-boot chain. It +will also be necessary to enrol the public key used into a relevant firmware +key database. + @node Platform limitations @chapter Platform limitations -- 2.27.0