linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: jmorris@namei.org
Cc: dhowells@redhat.com, keyrings@linux-nfs.org,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/5] KEYS: Fix public_key asymmetric key subtype name
Date: Tue, 02 Sep 2014 13:52:10 +0100	[thread overview]
Message-ID: <20140902125210.9247.89132.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <20140902125159.9247.11970.stgit@warthog.procyon.org.uk>

The length of the name of an asymmetric key subtype must be stored in struct
asymmetric_key_subtype::name_len so that it can be matched by a search for
"<subkey_name>:<partial_fingerprint>".  Fix the public_key subtype to have
name_len set.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 crypto/asymmetric_keys/public_key.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c
index 97eb001960b9..2f6e4fb1a1ea 100644
--- a/crypto/asymmetric_keys/public_key.c
+++ b/crypto/asymmetric_keys/public_key.c
@@ -121,6 +121,7 @@ static int public_key_verify_signature_2(const struct key *key,
 struct asymmetric_key_subtype public_key_subtype = {
 	.owner			= THIS_MODULE,
 	.name			= "public_key",
+	.name_len		= sizeof("public_key") - 1,
 	.describe		= public_key_describe,
 	.destroy		= public_key_destroy,
 	.verify_signature	= public_key_verify_signature_2,


  parent reply	other threads:[~2014-09-02 12:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 12:52 [PATCH 0/5] KEYS: Miscellaneous fixes David Howells
2014-09-02 12:52 ` [PATCH 1/5] KEYS: Increase root_maxkeys and root_maxbytes sizes David Howells
2014-09-02 12:52 ` David Howells [this message]
2014-09-02 12:52 ` [PATCH 3/5] KEYS: Set pr_fmt() in asymmetric key signature handling David Howells
2014-09-02 12:52 ` [PATCH 4/5] KEYS: Fix use-after-free in assoc_array_gc() David Howells
2014-09-02 12:52 ` [PATCH 5/5] PEFILE: Relax the check on the length of the PKCS#7 cert David Howells
2014-09-02 14:56 ` [PATCH 0/5] KEYS: Miscellaneous fixes James Morris
2014-09-02 18:07 ` David Howells
2014-09-03  0:55   ` James Morris

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=20140902125210.9247.89132.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=jmorris@namei.org \
    --cc=keyrings@linux-nfs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@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;
as well as URLs for NNTP newsgroup(s).