mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Stephan Mueller <smueller@chronox.de>
Cc: Rafael Aquini <aquini@redhat.com>,
	aris@redhat.com, Fengguang Wu <fengguang.wu@intel.com>,
	Jet Chen <jet.chen@intel.com>, Su Tao <tao.su@intel.com>,
	Yuanhan Liu <yuanhan.liu@intel.com>, LKP <lkp@01.org>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] DRBG: fix memory corruption for AES192
Date: Fri, 4 Jul 2014 11:12:35 +0800	[thread overview]
Message-ID: <20140704031235.GA22340@gondor.apana.org.au> (raw)
In-Reply-To: <3083657.SRQmeelhqi@myon.chronox.de>

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 <fengguang.wu@intel.com>
> Signed-off-by: Stephan Mueller <smueller@chronox.de>

BTW your patches were all corrupted by your mailer so I had to
fix them by hand.  Please check the cryptodev tree to ensure
that my fixes are correct.

In future please test your patches by applying your own patches
returned via the list.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  parent reply	other threads:[~2014-07-04  3:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-01 15:06 [PATCH 0/4] DRBG: Fixes for code review comments Stephan Mueller
2014-07-01 15:07 ` [PATCH 1/4] DRBG: Select correct DRBG core for stdrng Stephan Mueller
2014-07-01 15:07 ` [PATCH 2/4] DRBG: Mix a time stamp into DRBG state Stephan Mueller
2014-07-01 15:08 ` [PATCH 3/4] DRBG: fix memory corruption for AES192 Stephan Mueller
2014-07-04  3:08   ` Herbert Xu
2014-07-04  3:32     ` Stephan Mueller
2014-07-04  3:12   ` Herbert Xu [this message]
2014-07-04  3:36     ` Stephan Mueller
2014-07-01 15:09 ` [PATCH 4/4] DRBG: HMAC-SHA1 DRBG has crypto strength of 128 bits Stephan Mueller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140704031235.GA22340@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=aquini@redhat.com \
    --cc=aris@redhat.com \
    --cc=fengguang.wu@intel.com \
    --cc=jet.chen@intel.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@01.org \
    --cc=smueller@chronox.de \
    --cc=tao.su@intel.com \
    --cc=yuanhan.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®