From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752983AbbCKJK2 (ORCPT ); Wed, 11 Mar 2015 05:10:28 -0400 Received: from ringil.hengli.com.au ([178.18.16.133]:59601 "EHLO ringil.hengli.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752908AbbCKJKZ (ORCPT ); Wed, 11 Mar 2015 05:10:25 -0400 Date: Wed, 11 Mar 2015 20:10:16 +1100 From: Herbert Xu To: Stephan Mueller Cc: Tadeusz Struk , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] crypto: AES-NI: fix memory usage in GCM decryption Message-ID: <20150311091016.GA7858@gondor.apana.org.au> References: <22281096.OZkxDCz0xu@tachyon.chronox.de> <20150310094543.GA17358@gondor.apana.org.au> <1521038.6EeQHtyvI4@tachyon.chronox.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1521038.6EeQHtyvI4@tachyon.chronox.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 11, 2015 at 09:01:02AM +0100, Stephan Mueller wrote: > > However, I think there is an error in the calculation of the AAD pointer > offset. That offset is currently calculated as: > > assoc = (src + req->cryptlen + auth_tag_len); > > But instead, it should be: > > assoc = (src + req->cryptlen); > > as our buffer is only cryptlen + assolen in size. > > If you concur, I will write a patch and test it. Yes that's the problem I was referring to. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt