diff options
| author | David Howells <dhowells@redhat.com> | 2012-09-26 05:09:51 -0400 |
|---|---|---|
| committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-10-10 05:31:22 -0400 |
| commit | 631cc66eb9eaa7296e303197ff1eb0f55e32b61d (patch) | |
| tree | 631c962060a776a16ec35c477e99d4ef87c8db24 /kernel/Makefile | |
| parent | d441108c6f77541bb66fcd5b3389415b4c232008 (diff) | |
MODSIGN: Provide module signing public keys to the kernel
Include a PGP keyring containing the public keys required to perform module
verification in the kernel image during build and create a special keyring
during boot which is then populated with keys of crypto type holding the public
keys found in the PGP keyring.
These can be seen by root:
[root@andromeda ~]# cat /proc/keys
07ad4ee0 I----- 1 perm 3f010000 0 0 crypto modsign.0: RSA 87b9b3bd []
15c7f8c3 I----- 1 perm 1f030000 0 0 keyring .module_sign: 1/4
...
It is probably worth permitting root to invalidate these keys, resulting in
their removal and preventing further modules from being loaded with that key.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'kernel/Makefile')
| -rw-r--r-- | kernel/Makefile | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/Makefile b/kernel/Makefile index 58c6f111267e..111a845460c9 100644 --- a/kernel/Makefile +++ b/kernel/Makefile | |||
| @@ -55,7 +55,7 @@ obj-$(CONFIG_DEBUG_SPINLOCK) += spinlock.o | |||
| 55 | obj-$(CONFIG_PROVE_LOCKING) += spinlock.o | 55 | obj-$(CONFIG_PROVE_LOCKING) += spinlock.o |
| 56 | obj-$(CONFIG_UID16) += uid16.o | 56 | obj-$(CONFIG_UID16) += uid16.o |
| 57 | obj-$(CONFIG_MODULES) += module.o | 57 | obj-$(CONFIG_MODULES) += module.o |
| 58 | obj-$(CONFIG_MODULE_SIG) += module_signing.o | 58 | obj-$(CONFIG_MODULE_SIG) += module_signing.o modsign_pubkey.o |
| 59 | obj-$(CONFIG_KALLSYMS) += kallsyms.o | 59 | obj-$(CONFIG_KALLSYMS) += kallsyms.o |
| 60 | obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o | 60 | obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o |
| 61 | obj-$(CONFIG_KEXEC) += kexec.o | 61 | obj-$(CONFIG_KEXEC) += kexec.o |
| @@ -134,6 +134,13 @@ $(obj)/timeconst.h: $(src)/timeconst.pl FORCE | |||
| 134 | $(call if_changed,timeconst) | 134 | $(call if_changed,timeconst) |
| 135 | 135 | ||
| 136 | ifeq ($(CONFIG_MODULE_SIG),y) | 136 | ifeq ($(CONFIG_MODULE_SIG),y) |
| 137 | # | ||
| 138 | # Pull the signing certificate and any extra certificates into the kernel | ||
| 139 | # | ||
| 140 | extra_certificates: | ||
| 141 | touch $@ | ||
| 142 | |||
| 143 | kernel/modsign_pubkey.o: signing_key.x509 extra_certificates | ||
| 137 | 144 | ||
| 138 | ############################################################################### | 145 | ############################################################################### |
| 139 | # | 146 | # |
| @@ -180,4 +187,4 @@ x509.genkey: | |||
| 180 | @echo >>x509.genkey "subjectKeyIdentifier=hash" | 187 | @echo >>x509.genkey "subjectKeyIdentifier=hash" |
| 181 | @echo >>x509.genkey "authorityKeyIdentifier=keyid" | 188 | @echo >>x509.genkey "authorityKeyIdentifier=keyid" |
| 182 | endif | 189 | endif |
| 183 | CLEAN_FILES += signing_key.priv signing_key.x509 x509.genkey | 190 | CLEAN_FILES += signing_key.priv signing_key.x509 x509.genkey extra_certificates |
