From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759907AbaGDDIb (ORCPT ); Thu, 3 Jul 2014 23:08:31 -0400 Received: from helcar.apana.org.au ([209.40.204.226]:34874 "EHLO helcar.apana.org.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752120AbaGDDI3 (ORCPT ); Thu, 3 Jul 2014 23:08:29 -0400 Date: Fri, 4 Jul 2014 11:08:10 +0800 From: Herbert Xu To: Stephan Mueller Cc: Rafael Aquini , aris@redhat.com, Fengguang Wu , Jet Chen , Su Tao , Yuanhan Liu , LKP , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/4] DRBG: fix memory corruption for AES192 Message-ID: <20140704030810.GA22255@gondor.apana.org.au> References: <36957559.tbJt1gJF6I@myon.chronox.de> <3083657.SRQmeelhqi@myon.chronox.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3083657.SRQmeelhqi@myon.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 Tue, Jul 01, 2014 at 05:08:48PM +0200, Stephan Mueller wrote: > For the CTR DRBG, the drbg_state->scratchpad temp buffer (i.e. the > memory location immediately before the drbg_state->tfm variable > is the buffer that the BCC function operates on. BCC operates > blockwise. Making the temp buffer drbg_statelen(drbg) in size is > sufficient when the DRBG state length is a multiple of the block > size. For AES192 this is not the case and the length for temp is > insufficient (yes, that also means for such ciphers, the final > output of all BCC rounds are truncated before used to update the > state of the DRBG!!). > > The patch enlarges the temp buffer from drbg_statelen to > drbg_statelen + drbg_blocklen to have sufficient space. > > Reported-by: Fengguang Wu > Signed-off-by: Stephan Mueller I have applied just this patch out of your series. You patches depend on the previous four patches which I have not yet applied since there are still outstanding issues with two of them. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt