All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: linux-security-module@vger.kernel.org
Subject: [PATCH 09/15] KEYS: Fix the wrong index when checking the existence of second id
Date: Thu, 12 Oct 2017 20:17:02 +0000	[thread overview]
Message-ID: <150783942283.10956.5950640563358295848.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <150783935268.10956.14343227057986655899.stgit@warthog.procyon.org.uk>

From: Lee, Chun-Yi <joeyli.kernel@gmail.com>

Fix the wrong index number when checking the existence of second
id in function of finding asymmetric key. The id_1 is the second
id that the index in array must be 1 but not 0.

Fix: 9eb029893(KEYS: Generalise x509_request_asymmetric_key())

Cc: David Howells <dhowells@redhat.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>
Signed-off-by: David Howells <dhowells@redhat.com>
---

 crypto/asymmetric_keys/asymmetric_type.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/asymmetric_keys/asymmetric_type.c b/crypto/asymmetric_keys/asymmetric_type.c
index e4b0ed386bc8..a597f5c5a222 100644
--- a/crypto/asymmetric_keys/asymmetric_type.c
+++ b/crypto/asymmetric_keys/asymmetric_type.c
@@ -105,7 +105,7 @@ struct key *find_asymmetric_key(struct key *keyring,
 	if (id_0 && id_1) {
 		const struct asymmetric_key_ids *kids = asymmetric_key_ids(key);
 
-		if (!kids->id[0]) {
+		if (!kids->id[1]) {
 			pr_debug("First ID matches, but second is missing\n");
 			goto reject;
 		}


WARNING: multiple messages have this Message-ID (diff)
From: David Howells <dhowells@redhat.com>
To: ebiggers@google.com
Cc: keyrings@vger.kernel.org, dhowells@redhat.com,
	linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	"Lee, Chun-Yi" <jlee@suse.com>
Subject: [PATCH 09/15] KEYS: Fix the wrong index when checking the existence of second id
Date: Thu, 12 Oct 2017 21:17:02 +0100	[thread overview]
Message-ID: <150783942283.10956.5950640563358295848.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <150783935268.10956.14343227057986655899.stgit@warthog.procyon.org.uk>

From: Lee, Chun-Yi <joeyli.kernel@gmail.com>

Fix the wrong index number when checking the existence of second
id in function of finding asymmetric key. The id_1 is the second
id that the index in array must be 1 but not 0.

Fix: 9eb029893(KEYS: Generalise x509_request_asymmetric_key())

Cc: David Howells <dhowells@redhat.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>
Signed-off-by: David Howells <dhowells@redhat.com>
---

 crypto/asymmetric_keys/asymmetric_type.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/asymmetric_keys/asymmetric_type.c b/crypto/asymmetric_keys/asymmetric_type.c
index e4b0ed386bc8..a597f5c5a222 100644
--- a/crypto/asymmetric_keys/asymmetric_type.c
+++ b/crypto/asymmetric_keys/asymmetric_type.c
@@ -105,7 +105,7 @@ struct key *find_asymmetric_key(struct key *keyring,
 	if (id_0 && id_1) {
 		const struct asymmetric_key_ids *kids = asymmetric_key_ids(key);
 
-		if (!kids->id[0]) {
+		if (!kids->id[1]) {
 			pr_debug("First ID matches, but second is missing\n");
 			goto reject;
 		}

WARNING: multiple messages have this Message-ID (diff)
From: dhowells@redhat.com (David Howells)
To: linux-security-module@vger.kernel.org
Subject: [PATCH 09/15] KEYS: Fix the wrong index when checking the existence of second id
Date: Thu, 12 Oct 2017 21:17:02 +0100	[thread overview]
Message-ID: <150783942283.10956.5950640563358295848.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <150783935268.10956.14343227057986655899.stgit@warthog.procyon.org.uk>

From: Lee, Chun-Yi <joeyli.kernel@gmail.com>

Fix the wrong index number when checking the existence of second
id in function of finding asymmetric key. The id_1 is the second
id that the index in array must be 1 but not 0.

Fix: 9eb029893(KEYS: Generalise x509_request_asymmetric_key())

Cc: David Howells <dhowells@redhat.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>
Signed-off-by: David Howells <dhowells@redhat.com>
---

 crypto/asymmetric_keys/asymmetric_type.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/crypto/asymmetric_keys/asymmetric_type.c b/crypto/asymmetric_keys/asymmetric_type.c
index e4b0ed386bc8..a597f5c5a222 100644
--- a/crypto/asymmetric_keys/asymmetric_type.c
+++ b/crypto/asymmetric_keys/asymmetric_type.c
@@ -105,7 +105,7 @@ struct key *find_asymmetric_key(struct key *keyring,
 	if (id_0 && id_1) {
 		const struct asymmetric_key_ids *kids = asymmetric_key_ids(key);
 
-		if (!kids->id[0]) {
+		if (!kids->id[1]) {
 			pr_debug("First ID matches, but second is missing\n");
 			goto reject;
 		}

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-10-12 20:17 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 16:17 [RFC][PATCH 00/15] KEYS: Fixes David Howells
2017-10-12 16:17 ` David Howells
2017-10-12 16:17 ` David Howells
2017-10-12 16:26 ` David Howells
2017-10-12 16:26   ` David Howells
2017-10-12 16:26   ` David Howells
2017-10-12 18:56 ` Eric Biggers
2017-10-12 18:56   ` Eric Biggers
2017-10-12 18:56   ` Eric Biggers
2017-10-12 20:15 ` David Howells
2017-10-12 20:15   ` David Howells
2017-10-12 20:15   ` David Howells
2017-10-12 20:16   ` [PATCH 01/15] KEYS: encrypted: fix dereference of NULL user_key_payload David Howells
2017-10-12 20:16     ` David Howells
2017-10-12 20:16     ` David Howells
2017-10-12 20:16   ` [PATCH 02/15] FS-Cache: " David Howells
2017-10-12 20:16     ` David Howells
2017-10-12 20:16     ` David Howells
2017-10-12 20:16   ` [PATCH 03/15] lib/digsig: " David Howells
2017-10-12 20:16     ` David Howells
2017-10-12 20:16     ` David Howells
2017-10-12 20:16   ` [PATCH 04/15] fscrypt: " David Howells
2017-10-12 20:16     ` David Howells
2017-10-12 20:16     ` David Howells
2017-10-12 20:16   ` [PATCH 05/15] ecryptfs: " David Howells
2017-10-12 20:16     ` David Howells
2017-10-12 20:16     ` David Howells
2017-10-12 20:16   ` [PATCH 06/15] ecryptfs: fix out-of-bounds read of key payload David Howells
2017-10-12 20:16     ` David Howells
2017-10-12 20:16     ` David Howells
2017-10-12 20:16   ` [PATCH 07/15] ecryptfs: move key payload accessor functions into keystore.c David Howells
2017-10-12 20:16     ` David Howells
2017-10-12 20:16     ` David Howells
2017-10-12 20:16   ` [PATCH 08/15] security/keys: BIG_KEY requires CONFIG_CRYPTO David Howells
2017-10-12 20:16     ` David Howells
2017-10-12 20:16     ` David Howells
2017-10-12 20:17   ` David Howells [this message]
2017-10-12 20:17     ` [PATCH 09/15] KEYS: Fix the wrong index when checking the existence of second id David Howells
2017-10-12 20:17     ` David Howells
2017-10-12 20:17   ` [PATCH 10/15] KEYS: checking the input id parameters before finding asymmetric key David Howells
2017-10-12 20:17     ` David Howells
2017-10-12 20:17     ` David Howells
2017-10-12 20:17   ` [PATCH 11/15] KEYS: Fix race between updating and finding a negative key David Howells
2017-10-12 20:17     ` David Howells
2017-10-12 20:17     ` David Howells
2017-10-12 20:17   ` [PATCH 12/15] KEYS: don't let add_key() update an uninstantiated key David Howells
2017-10-12 20:17     ` David Howells
2017-10-12 20:17     ` David Howells
2017-10-12 20:17   ` [PATCH 13/15] KEYS: load key flags and expiry time atomically in key_validate() David Howells
2017-10-12 20:17     ` David Howells
2017-10-12 20:17     ` David Howells
2017-10-12 20:17   ` [PATCH 14/15] KEYS: load key flags and expiry time atomically in keyring_search_iterator() David Howells
2017-10-12 20:17     ` David Howells
2017-10-12 20:17     ` David Howells
2017-10-12 20:17   ` [PATCH 15/15] KEYS: load key flags and expiry time atomically in proc_keys_show() David Howells
2017-10-12 20:17     ` David Howells
2017-10-12 20:17     ` David Howells
2017-10-13 15:39 ` [RFC][PATCH 00/15] KEYS: Fixes David Howells
2017-10-13 15:39   ` David Howells
2017-10-13 15:39   ` David Howells
2017-10-16 18:31   ` Eric Biggers
2017-10-16 18:31     ` Eric Biggers
2017-10-16 18:31     ` Eric Biggers
2017-10-16 22:09   ` David Howells
2017-10-16 22:09     ` David Howells
2017-10-16 22:09     ` David Howells
2017-10-16 22:27   ` David Howells
2017-10-16 22:27     ` David Howells
2017-10-16 22:27     ` David Howells
2017-10-17 17:52     ` Eric Biggers
2017-10-17 17:52       ` Eric Biggers
2017-10-17 17:52       ` Eric Biggers

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=150783942283.10956.5950640563358295848.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.