linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] ima: kernel build support for loading the kernel module signing key
@ 2021-02-18 22:00 Nayna Jain
  2021-02-18 22:00 ` [PATCH v2 1/5] keys: cleanup build time module signing keys Nayna Jain
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Nayna Jain @ 2021-02-18 22:00 UTC (permalink / raw)
  To: linux-integrity, keyrings
  Cc: linux-security-module, David Howells, Jarkko Sakkinen,
	Mimi Zohar, Stefan Berger, Linux Kernel Mailing List, Nayna Jain

Kernel modules are currently only signed when CONFIG_MODULE_SIG is enabled.
The kernel module signing key is a self-signed CA only loaded onto the
.builtin_trusted_key keyring.  On secure boot enabled systems with an arch
specific IMA policy enabled, but without MODULE_SIG enabled, kernel modules
are not signed, nor is the kernel module signing public key loaded onto the
IMA keyring.

In order to load the the kernel module signing key onto the IMA trusted
keyring ('.ima'), the certificate needs to be signed by a CA key either on
the builtin or secondary keyrings.  This series of patches enables IMA
verification of signed kernel modules by:

* Defining a kernel CA key. The CA key signs the kernel module signing key
and is loaded onto the .builtin_trusted_key keyring, only when the kernel
module signing key is loaded onto the .ima keyring.

* Enable module signing at build time for IMA_APPRAISE_MODSIG as well

v2:

* Include feedback from Stefan - corrected the Fixes commit id in Patch 1
and cleaned Patch 5/5.
* Fix the issue reported by kernel test bot.
* Include Jarkko's feedback on patch description.

Nayna Jain (5):
  keys: cleanup build time module signing keys
  keys: generate self-signed module signing key using CSR
  ima: update kernel module signing process during build
  keys: define build time generated ephemeral kernel CA key
  ima: enable loading of build time generated key on .ima keyring

 Makefile                      |  9 ++--
 certs/Kconfig                 |  2 +-
 certs/Makefile                | 77 ++++++++++++++++++++++++++++++++---
 certs/system_certificates.S   | 16 +++++++-
 certs/system_keyring.c        | 55 +++++++++++++++++++------
 include/keys/system_keyring.h |  9 +++-
 init/Kconfig                  |  6 +--
 security/integrity/digsig.c   |  4 ++
 8 files changed, 150 insertions(+), 28 deletions(-)

-- 
2.29.2

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-02-19 15:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-18 22:00 [PATCH v2 0/5] ima: kernel build support for loading the kernel module signing key Nayna Jain
2021-02-18 22:00 ` [PATCH v2 1/5] keys: cleanup build time module signing keys Nayna Jain
2021-02-19 15:12   ` Stefan Berger
2021-02-18 22:00 ` [PATCH v2 2/5] keys: generate self-signed module signing key using CSR Nayna Jain
2021-02-19 15:15   ` Stefan Berger
2021-02-18 22:00 ` [PATCH v2 3/5] ima: update kernel module signing process during build Nayna Jain
2021-02-19 15:20   ` Stefan Berger
2021-02-18 22:00 ` [PATCH v2 4/5] keys: define build time generated ephemeral kernel CA key Nayna Jain
2021-02-19 15:25   ` Stefan Berger
2021-02-18 22:00 ` [PATCH v2 5/5] ima: enable loading of build time generated key on .ima keyring Nayna Jain
2021-02-18 23:02   ` Mimi Zohar
2021-02-19 14:59   ` Stefan Berger

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).