From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752067AbbEZTuR (ORCPT ); Tue, 26 May 2015 15:50:17 -0400 Received: from lan.nucleusys.com ([92.247.61.126]:46074 "EHLO zztop.nucleusys.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751359AbbEZTuI (ORCPT ); Tue, 26 May 2015 15:50:08 -0400 User-Agent: K-9 Mail for Android In-Reply-To: <19779.1432656938@warthog.procyon.org.uk> References: <1432084120-7918-1-git-send-email-mmarek@suse.cz> <18832.1432044859.1@warthog.procyon.org.uk> <19779.1432656938@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [PATCH 1/3] X.509: Fix certificate gathering again From: Petko Manolov Date: Tue, 26 May 2015 22:49:49 +0300 To: David Howells , Michal Marek CC: torvalds@linux-foundation.org, aricart@memnix.com, linux-kernel@vger.kernel.org, sedat.dilek@gmail.com, keyrings@linux-nfs.org, rusty@rustcorp.com.au, linux-security-module@vger.kernel.org, james.l.morris@oracle.com, dwmw2@infradead.org Message-ID: <6566F8DA-CA71-41EB-BC8D-5C934BBAB322@mip-labs.com> X-Spam-Score: -1.0 (-) X-Spam-Report: Spam detection software, running on the system "zztop.nucleusys.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: On May 26, 2015 7:15:38 PM GMT+03:00, David Howells wrote: >Hi Michal, > >Could you have a look at the patch at the end of my branch: > > http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=modsign-pkcs7 > >It changes things from picking up arbitrary *.x509 files dropped in the >kernel >source and/or build directory to taking a single named PEM file with >all the >additional certs as a string config option. The PEM file can contain >multiple >certs simply cat'd together. > >If you're okay with that, it obsoletes these patches of yours. > >I've attached it here for convenience also. > >David >--- >commit 9c71c950793b1b8c23c6d945b31f6545f82adced >Author: David Woodhouse >Date: Thu May 21 12:23:55 2015 +0100 > > modsign: Add explicit CONFIG_SYSTEM_TRUSTED_KEYS option > >Let the user explicitly provide a file containing trusted keys, instead >of > just automatically finding files matching *.x509 in the build tree and > trusting whatever we find. This really ought to be an *explicit* > configuration, and the build rules for dealing with the files were > fairly painful too. > > Signed-off-by: David Woodhouse > Signed-off-by: David Howells > >diff --git a/Documentation/module-signing.txt >b/Documentation/module-signing.txt >index 5d5e4e32dc26..4e62bc29666e 100644 >--- a/Documentation/module-signing.txt >+++ b/Documentation/module-signing.txt >@@ -88,6 +88,7 @@ This has a number of options available: >than being a module) so that modules signed with that algorithm can >have > their signatures checked without causing a dependency loop. > >+ >(4) "File name or PKCS#11 URI of module signing key" >(CONFIG_MODULE_SIG_KEY) > > Setting this option to something other than its default of >@@ -104,6 +105,13 @@ This has a number of options available: > means of the KBUILD_SIGN_PIN variable. > > >+ (5) "Additional X.509 keys for default system keyring" >(CONFIG_SYSTEM_TRUSTED_KEYS) >+ >+ This option can be set to [...] Content analysis details: (-1.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On May 26, 2015 7:15:38 PM GMT+03:00, David Howells wrote: >Hi Michal, > >Could you have a look at the patch at the end of my branch: > > http://git.kernel.org/cgit/linux/kernel/git/dhowells/linux-fs.git/log/?h=modsign-pkcs7 > >It changes things from picking up arbitrary *.x509 files dropped in the >kernel >source and/or build directory to taking a single named PEM file with >all the >additional certs as a string config option. The PEM file can contain >multiple >certs simply cat'd together. > >If you're okay with that, it obsoletes these patches of yours. > >I've attached it here for convenience also. > >David >--- >commit 9c71c950793b1b8c23c6d945b31f6545f82adced >Author: David Woodhouse >Date: Thu May 21 12:23:55 2015 +0100 > > modsign: Add explicit CONFIG_SYSTEM_TRUSTED_KEYS option > >Let the user explicitly provide a file containing trusted keys, instead >of > just automatically finding files matching *.x509 in the build tree and > trusting whatever we find. This really ought to be an *explicit* > configuration, and the build rules for dealing with the files were > fairly painful too. > > Signed-off-by: David Woodhouse > Signed-off-by: David Howells > >diff --git a/Documentation/module-signing.txt >b/Documentation/module-signing.txt >index 5d5e4e32dc26..4e62bc29666e 100644 >--- a/Documentation/module-signing.txt >+++ b/Documentation/module-signing.txt >@@ -88,6 +88,7 @@ This has a number of options available: >than being a module) so that modules signed with that algorithm can >have > their signatures checked without causing a dependency loop. > >+ >(4) "File name or PKCS#11 URI of module signing key" >(CONFIG_MODULE_SIG_KEY) > > Setting this option to something other than its default of >@@ -104,6 +105,13 @@ This has a number of options available: > means of the KBUILD_SIGN_PIN variable. > > >+ (5) "Additional X.509 keys for default system keyring" >(CONFIG_SYSTEM_TRUSTED_KEYS) >+ >+ This option can be set to the filename of a PEM-encoded file >containing >+ additional certificates which will be included in the system >keyring by >+ default. >+ >+ > ======================= > GENERATING SIGNING KEYS > ======================= >@@ -171,10 +179,9 @@ in a keyring called ".system_keyring" that can be >seen by: > 302d2d52 I------ 1 perm 1f010000 0 0 asymmetri Fedora >kernel signing key: d69a84e6bce3d216b979e9505b3e3ef9a7118079: X509.RSA >a7118079 [] > ... > >-Beyond the public key generated specifically for module signing, any >file >-placed in the kernel source root directory or the kernel build root >directory >-whose name is suffixed with ".x509" will be assumed to be an X.509 >public key >-and will be added to the keyring. >+Beyond the public key generated specifically for module signing, I think this should be "private", not "public" key. The modules are signed with the private key... Petko