linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fw: [PATCH] Restrict read access to private module signing key
@ 2016-01-06  0:06 Luis Ressel
  0 siblings, 0 replies; only message in thread
From: Luis Ressel @ 2016-01-06  0:06 UTC (permalink / raw)
  To: linux-kernel

I forgot to CC this mailing list.

Begin forwarded message:

Date: Sat,  2 Jan 2016 16:13:50 +0100
From: Luis Ressel <aranea@aixah.de>
To: keyrings@vger.kernel.org
Cc: keyrings@linux-nfs.org, David Howells <dhowells@redhat.com>, David
Woodhouse <dwmw2@infradead.org> Subject: [PATCH] Restrict read access
to private module signing key


The autogenerated module signing key shouldn't be world-readable.

Signed-off-by: Luis Ressel <aranea@aixah.de>
---
 certs/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/certs/Makefile b/certs/Makefile
index 28ac694..7f1f082 100644
--- a/certs/Makefile
+++ b/certs/Makefile
@@ -49,6 +49,8 @@ $(obj)/signing_key.pem: $(obj)/x509.genkey
 	@echo "### needs to be run as root, and uses a hardware random"
 	@echo "### number generator if one is available."
 	@echo "###"
+	touch $(obj)/signing_key.pem
+	chmod 0600 $(obj)/signing_key.pem
 	openssl req -new -nodes -utf8 -$(CONFIG_MODULE_SIG_HASH) -days
36500 \ -batch -x509 -config $(obj)/x509.genkey \
 		-outform PEM -out $(obj)/signing_key.pem \
-- 
2.6.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-01-06  0:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-06  0:06 Fw: [PATCH] Restrict read access to private module signing key Luis Ressel

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