From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762417AbZEGT2g (ORCPT ); Thu, 7 May 2009 15:28:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757392AbZEGT2V (ORCPT ); Thu, 7 May 2009 15:28:21 -0400 Received: from mx2.redhat.com ([66.187.237.31]:41675 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755209AbZEGT2T (ORCPT ); Thu, 7 May 2009 15:28:19 -0400 From: Jarod Wilson Organization: Red Hat, Inc. To: linux-crypto@vger.kernel.org Subject: Re: [PATCH 0/2] crypto: disallow non-approved algs in fips mode Date: Thu, 7 May 2009 15:27:16 -0400 User-Agent: KMail/1.11.2 (Linux/2.6.29.1-102.fc11.x86_64; KDE/4.2.2; x86_64; ; ) Cc: linux-kernel@vger.kernel.org, Herbert Xu , Neil Horman References: <200905071441.27093.jarod@redhat.com> In-Reply-To: <200905071441.27093.jarod@redhat.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905071527.17153.jarod@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 07 May 2009 14:41:26 Jarod Wilson wrote: > At present, nothing is preventing the use of non-approved algorithms > in fips mode. I was initially working on a patch to make it easier > for all fips-approved algs to be tested using tcrypt, and realized > the changes I was making could also be used to prevent non-approved > algs in fips mode. Any approved alg *must* have self-tests, and thus > have an entry in testmgr.c's alg_test_descs[]. By adding a fips flag > to these entries, we can simply reject all algs that don't have this > flag when in fips mode by skipping their self-tests and returning > an -EINVAL to prevent them from being loaded. So with this change, I > can > > 1) 'modprobe tcrypt' and have all fips approved algs self-tested, and > *only* fips approved algs tested > > 2) 'modprobe md4' for example, and in fips mode, have the module load > rejected as invalid Hrm. Minor correction... Only seeing module loads rejected as invalid when patching this into a Red Hat Enterprise Linux 5.x kernel. With the cryptodev tree, we do skip non-allowed algs as intended, but loading modules for non-allowed algs still works... -- Jarod Wilson jarod@redhat.com