mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Luis Ressel <aranea@aixah.de>
To: David Howells <dhowells@redhat.com>,
	David Woodhouse <dwmw2@infradead.org>,
	keyrings@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Restrict read access to private module signing key
Date: Sat, 30 Jan 2016 14:27:44 +0100	[thread overview]
Message-ID: <1454160464-12380-1-git-send-email-aranea@aixah.de> (raw)

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

             reply	other threads:[~2016-01-30 13:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-30 13:27 Luis Ressel [this message]
     [not found] <1451747630-15940-1-git-send-email-aranea@aixah.de>
2016-01-16 23:02 ` Luis Ressel

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=1454160464-12380-1-git-send-email-aranea@aixah.de \
    --to=aranea@aixah.de \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®