Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp648394ybi; Fri, 2 Aug 2019 01:59:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqxCtwL+Kc+vZ0eouM8tUGBfTN/IYNvmfhZaGHaC9BPckkA8PD3z1ZLtCiHdiRTJ14b5polR X-Received: by 2002:a17:902:e383:: with SMTP id ch3mr129853799plb.23.1564736365558; Fri, 02 Aug 2019 01:59:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564736365; cv=none; d=google.com; s=arc-20160816; b=LxQqHXD4DLRzAYmsGen2NbRv5j3S/6buETYoASYUNn9T6ZKYmKEHlrwuuR4sWDfGKE AqIzh8QPicZ/F1eartrGZEclrFcyovFuirbTMom91jqiSQzfjIAlZV8/uPxyFeiOWt1W Tg8kmu/JId0IdNYJyfXi6xLr5nJgZLd5j4jvHgoSoJyzHL0lTic0q+p5bDx9K3u8Swfm aHYp5xVhf9lipYUKvAxiYDpnoIWdDCPJS+CRzu+w968wpd8dzI+KQ54w5Yoi0dtr+qGc jNci2ZNxTK0/1MPU4rP/wUISBBDLDvhD4PDBasFL7s0baAGqnteOr/cZJkdOvo6RrYl7 X4RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=zYnwkyDWaIG2c8Vkp9oZLEqJTdq5kTpRtMTPu1OPkxE=; b=xVJXxSanBFRyDG8A9cLMxZhrGq2IiHnnO4khUdkscwz90h/SHd3qft48oATB4aizx8 +d3a0JXi62cODnwvkbiokU4le6mnGwWqTjj4Fr/JotW7kAWQsiZbiOluR+k8x/WfsGJu Hr/bt68KTDC6LDXrlFpbZsKuFpqoZldadwpfQ36wzn+CdUeVzgVjvYt3ycDn0XnrbS8e UnGYtIBZQl06UVsbOzOB2y9EfGs1wbBjLp/2Bu1cGiKbBtQVrTVxq0T3IyqtMhnfxWiz FayPIFdUlipbWJR11AgjZB95OPQf8l7KXWL/8/OF2GpHY4kNP91qge0a1RFS7AIsV4Bw H2Sg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b28si40108959pfp.92.2019.08.02.01.59.12; Fri, 02 Aug 2019 01:59:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732348AbfHBE45 (ORCPT + 99 others); Fri, 2 Aug 2019 00:56:57 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:48752 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732095AbfHBE45 (ORCPT ); Fri, 2 Aug 2019 00:56:57 -0400 Received: from gondolin.me.apana.org.au ([192.168.0.6] helo=gondolin.hengli.com.au) by fornost.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1htPcd-0006N7-LJ; Fri, 02 Aug 2019 14:56:55 +1000 Received: from herbert by gondolin.hengli.com.au with local (Exim 4.80) (envelope-from ) id 1htPcc-0004ld-Jv; Fri, 02 Aug 2019 14:56:54 +1000 Date: Fri, 2 Aug 2019 14:56:54 +1000 From: Herbert Xu To: "Hook, Gary" Cc: "linux-crypto@vger.kernel.org" , "davem@davemloft.net" , "Lendacky, Thomas" Subject: Re: [PATCH 0/3] AES GCM fixes for the CCP crypto driver Message-ID: <20190802045654.GK18077@gondor.apana.org.au> References: <20190730160454.7617-1-gary.hook@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190730160454.7617-1-gary.hook@amd.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Jul 30, 2019 at 04:05:07PM +0000, Hook, Gary wrote: > Additional testing features added to the crypto framework (including fuzzy > probing and variations of the lengths of input parameters such as AAD and > authsize) expose some gaps in robustness and function in the CCP driver. > Address these gaps: > > Input text is allowed to be zero bytes in length. In this case no > encryption/decryption occurs, and certain data structures are not > allocated. Don't clean up what doesn't exist. > > Valid auth tag sizes are 4, 8, 12, 13, 14, 15 or 16 bytes. > Note: since the CCP driver has been designed to be used directly, add > validation of the authsize parameter at this layer. > > AES GCM defines the input text for decryption as the concatenation of > the AAD, the ciphertext, and the tag. Only the cipher text needs to > be decrypted; the tag is simple used for comparison. > > Gary R Hook (3): > crypto: ccp - Fix oops by properly managing allocated structures > crypto: ccp - Add support for valid authsize values less than 16 > crypto: ccp - Ignore tag length when decrypting GCM ciphertext > > drivers/crypto/ccp/ccp-crypto-aes-galois.c | 14 +++++++++ > drivers/crypto/ccp/ccp-ops.c | 33 ++++++++++++++++------ > include/linux/ccp.h | 2 ++ > 3 files changed, 40 insertions(+), 9 deletions(-) All applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt