public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PKCS#7: fix missing break on OID_sha224 case
@ 2016-03-18 15:51 Colin King
  2016-04-05 12:46 ` Herbert Xu
  2016-04-06 12:55 ` David Howells
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2016-03-18 15:51 UTC (permalink / raw)
  To: Herbert Xu, David S . Miller, David Howells, Tadeusz Struk,
	Peter Jones, linux-crypto
  Cc: stable, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The OID_sha224 case is missing a break and it falls through
to the -ENOPKG error default.  Since HASH_ALGO_SHA224 seems
to be supported, this looks like an unintentional missing break.

Fixes: 07f081fb5057 ("PKCS#7: Add OIDs for sha224, sha284 and sha512 hash algos and use them")
Cc: <stable@vger.kernel.org> # 4.2+
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 crypto/asymmetric_keys/pkcs7_parser.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/crypto/asymmetric_keys/pkcs7_parser.c b/crypto/asymmetric_keys/pkcs7_parser.c
index 40de03f..bdd0d753 100644
--- a/crypto/asymmetric_keys/pkcs7_parser.c
+++ b/crypto/asymmetric_keys/pkcs7_parser.c
@@ -237,6 +237,7 @@ int pkcs7_sig_note_digest_algo(void *context, size_t hdrlen,
 		break;
 	case OID_sha224:
 		ctx->sinfo->sig.hash_algo = "sha224";
+		break;
 	default:
 		printk("Unsupported digest algo: %u\n", ctx->last_oid);
 		return -ENOPKG;
-- 
2.7.3

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

* Re: [PATCH] PKCS#7: fix missing break on OID_sha224 case
  2016-03-18 15:51 [PATCH] PKCS#7: fix missing break on OID_sha224 case Colin King
@ 2016-04-05 12:46 ` Herbert Xu
  2016-04-06 12:55 ` David Howells
  1 sibling, 0 replies; 3+ messages in thread
From: Herbert Xu @ 2016-04-05 12:46 UTC (permalink / raw)
  To: Colin King
  Cc: David S . Miller, David Howells, Tadeusz Struk, Peter Jones,
	linux-crypto, stable, linux-kernel

On Fri, Mar 18, 2016 at 03:51:31PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The OID_sha224 case is missing a break and it falls through
> to the -ENOPKG error default.  Since HASH_ALGO_SHA224 seems
> to be supported, this looks like an unintentional missing break.
> 
> Fixes: 07f081fb5057 ("PKCS#7: Add OIDs for sha224, sha284 and sha512 hash algos and use them")
> Cc: <stable@vger.kernel.org> # 4.2+
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: [PATCH] PKCS#7: fix missing break on OID_sha224 case
  2016-03-18 15:51 [PATCH] PKCS#7: fix missing break on OID_sha224 case Colin King
  2016-04-05 12:46 ` Herbert Xu
@ 2016-04-06 12:55 ` David Howells
  1 sibling, 0 replies; 3+ messages in thread
From: David Howells @ 2016-04-06 12:55 UTC (permalink / raw)
  To: Colin King
  Cc: dhowells, Herbert Xu, David S . Miller, Tadeusz Struk,
	Peter Jones, linux-crypto, stable, linux-kernel

Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> The OID_sha224 case is missing a break and it falls through
> to the -ENOPKG error default.  Since HASH_ALGO_SHA224 seems
> to be supported, this looks like an unintentional missing break.
> 
> Fixes: 07f081fb5057 ("PKCS#7: Add OIDs for sha224, sha284 and sha512 hash algos and use them")
> Cc: <stable@vger.kernel.org> # 4.2+
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

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

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

end of thread, other threads:[~2016-04-06 12:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-18 15:51 [PATCH] PKCS#7: fix missing break on OID_sha224 case Colin King
2016-04-05 12:46 ` Herbert Xu
2016-04-06 12:55 ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox