From: Jeremy Linton <jeremy.linton@arm.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@linux-foundation.org, hch@lst.de,
gregkh@linuxfoundation.org, graf@amazon.com, lukas@wunner.de,
wufan@linux.microsoft.com, brauner@kernel.org,
jsperbeck@google.com, ardb@kernel.org,
linux-crypto@vger.kernel.org, linux-kbuild@vger.kernel.org,
keyrings@vger.kernel.org, Jeremy Linton <jeremy.linton@arm.com>
Subject: [RFC 1/5] initramfs: Add initramfs signature checking
Date: Tue, 15 Oct 2024 17:22:31 -0500 [thread overview]
Message-ID: <20241015222235.71040-2-jeremy.linton@arm.com> (raw)
In-Reply-To: <20241015222235.71040-1-jeremy.linton@arm.com>
Various root-level processes, configurations, and the like can exist
in the initramfs provided by the boot loader. The kernel does a
reasonable job of signature checking and blocking unsigned code from
running in the kernel, but this is only one aspect of system
security. The remaining init and early startup code running in
userspace are just as critical to system security.
This option provides a basic initramfs signature check, which reuses
the module signature checking infrastructure to validate the boot
loader provided initramfs. Later, a system policy can allow or deny
images that fail the signature check.
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
usr/Kconfig | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/usr/Kconfig b/usr/Kconfig
index 9279a2893ab0..a9c0dc0112eb 100644
--- a/usr/Kconfig
+++ b/usr/Kconfig
@@ -32,6 +32,15 @@ config INITRAMFS_FORCE
and is useful if you cannot or don't want to change the image
your bootloader passes to the kernel.
+config INITRAMFS_SIG
+ bool "Validate signed initramfs images"
+ depends on SYSTEM_DATA_VERIFICATION
+ help
+ This option validates that image provided by the
+ bootloader is signed. The decision to accept or
+ reject the image is then left to the kernel lockdown
+ logic.
+
config INITRAMFS_ROOT_UID
int "User ID to map to 0 (user root)"
depends on INITRAMFS_SOURCE!=""
--
2.46.0
next prev parent reply other threads:[~2024-10-15 22:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 22:22 [RFC 0/5] Another initramfs signature checking set Jeremy Linton
2024-10-15 22:22 ` Jeremy Linton [this message]
2024-10-15 22:22 ` [RFC 2/5] KEYS/certs: Start the builtin key and cert system earlier Jeremy Linton
2024-10-15 22:22 ` [RFC 3/5] initramfs: Use existing module signing infrastructure Jeremy Linton
2024-10-15 22:22 ` [RFC 4/5] sign-file: Add -i option to sign initramfs images Jeremy Linton
2024-10-15 22:22 ` [RFC 5/5] initramfs: Enforce initramfs signature Jeremy Linton
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=20241015222235.71040-2-jeremy.linton@arm.com \
--to=jeremy.linton@arm.com \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=brauner@kernel.org \
--cc=graf@amazon.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=jsperbeck@google.com \
--cc=keyrings@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=wufan@linux.microsoft.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