linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] certs: always use secondary keyring first if possible
@ 2017-11-18  4:47 Dave Young
  2017-11-29  2:15 ` Dave Young
  2017-12-14 10:25 ` Dave Young
  0 siblings, 2 replies; 5+ messages in thread
From: Dave Young @ 2017-11-18  4:47 UTC (permalink / raw)
  To: David Howells; +Cc: keyrings, linux-kernel, kexec

Commit d3bfe84129f6 introduced secondary_trusted_keys keyring, current
users of verify_pkcs7_signature are below:
net/wireless/reg.c : uses its own trusted_keys
kernel/module_signing.c : pass NULL trusted_keys 
crypto/asymmetric_keys/verify_pefile.c : pass NULL trusted_keys

For both module and pefile verification, there is no reason to use builtin
keys only. Actually in Fedora kernel module signing code passes 1UL, but
kexec code does not pass 1UL for pefile verification thus we have below bug
https://bugzilla.redhat.com/show_bug.cgi?id=1470995

Drop the hard code 1UL checking so that pefile verification can use
secondary keyring as well.

Signed-off-by: Dave Young <dyoung@redhat.com>
---
 certs/system_keyring.c |    2 --
 1 file changed, 2 deletions(-)

--- linux-x86.orig/certs/system_keyring.c
+++ linux-x86/certs/system_keyring.c
@@ -229,8 +229,6 @@ int verify_pkcs7_signature(const void *d
 		goto error;
 
 	if (!trusted_keys) {
-		trusted_keys = builtin_trusted_keys;
-	} else if (trusted_keys == (void *)1UL) {
 #ifdef CONFIG_SECONDARY_TRUSTED_KEYRING
 		trusted_keys = secondary_trusted_keys;
 #else

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-06-08  8:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-18  4:47 [PATCH] certs: always use secondary keyring first if possible Dave Young
2017-11-29  2:15 ` Dave Young
2017-12-14 10:25 ` Dave Young
2018-06-08  7:28   ` Dave Young
2018-06-08  8:53     ` Dave Young

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