Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1322359 > unrolled thread

[PATCH] Restrict read access to private module signing key

Started byLuis Ressel <aranea@aixah.de>
First post2016-01-30 14:30 +0100
Last post2016-01-30 14:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] Restrict read access to private module signing key Luis Ressel <aranea@aixah.de> - 2016-01-30 14:30 +0100

#1322359 — [PATCH] Restrict read access to private module signing key

FromLuis Ressel <aranea@aixah.de>
Date2016-01-30 14:30 +0100
Subject[PATCH] Restrict read access to private module signing key
Message-ID<qWDLc-3v2-19@gated-at.bofh.it>
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.7.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web