From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752189AbbCSHYJ (ORCPT ); Thu, 19 Mar 2015 03:24:09 -0400 Received: from mail.eperm.de ([89.247.134.16]:46747 "EHLO mail.eperm.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751305AbbCSHYE convert rfc822-to-8bit (ORCPT ); Thu, 19 Mar 2015 03:24:04 -0400 From: Stephan Mueller To: Herbert Xu Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/16] crypto: prevent helper ciphers from being used Date: Thu, 19 Mar 2015 08:23:58 +0100 Message-ID: <29741349.4tmP3Ys1qT@tauon> User-Agent: KMail/4.14.4 (Linux/3.18.8-201.fc21.x86_64; KDE/4.14.4; x86_64; ; ) In-Reply-To: <20150319071630.GA2902@gondor.apana.org.au> References: <21952258.n2qYaab1Is@tachyon.chronox.de> <109752153.14abfcUJ8X@tachyon.chronox.de> <20150319071630.GA2902@gondor.apana.org.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Donnerstag, 19. März 2015, 18:16:30 schrieb Herbert Xu: Hi Herbert, >On Thu, Mar 19, 2015 at 07:57:36AM +0100, Stephan Mueller wrote: >> diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c >> index db201bca..2cd83ad 100644 >> --- a/crypto/ablkcipher.c >> +++ b/crypto/ablkcipher.c >> @@ -688,7 +688,7 @@ struct crypto_ablkcipher >> *crypto_alloc_ablkcipher(const char *alg_name,> >> goto err; >> >> } >> >> - tfm = __crypto_alloc_tfm(alg, type, mask); >> + tfm = __crypto_alloc_tfm_safe(alg, type, mask); > >Rather than changing every algorithm type, I'd rather suggest >that you modify crypto_alg_mod_lookup so that it's kept in one >spot. Just copy what we currently do for CRYPTO_ALG_TESTED. How can you distinguish between calls coming from crypto_*_spawn (which we need to allow) and calls that come from the normal API calls (which we should block? > >Thanks, Ciao Stephan