From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753325AbcFEVz5 (ORCPT ); Sun, 5 Jun 2016 17:55:57 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43517 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754047AbcFEVxU (ORCPT ); Sun, 5 Jun 2016 17:53:20 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Ian King , Herbert Xu Subject: [PATCH 4.6 071/121] PKCS#7: fix missing break on OID_sha224 case Date: Sun, 5 Jun 2016 14:43:43 -0700 Message-Id: <20160605214419.883430345@linuxfoundation.org> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160605214417.708509043@linuxfoundation.org> References: <20160605214417.708509043@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Colin Ian King commit 06af9b0f4949b85b20107e6d75f5eba15111d220 upstream. 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") Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman --- crypto/asymmetric_keys/pkcs7_parser.c | 1 + 1 file changed, 1 insertion(+) --- 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 *con break; case OID_sha224: ctx->sinfo->sig.hash_algo = "sha224"; + break; default: printk("Unsupported digest algo: %u\n", ctx->last_oid); return -ENOPKG;