[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200211192118.GA24059@Red>
Date: Tue, 11 Feb 2020 20:21:18 +0100
From: Corentin Labbe <clabbe.montjoie@...il.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Eric Biggers <ebiggers@...nel.org>, davem@...emloft.net,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [BUG] crypto: export() overran state buffer on test vector
On Sat, Feb 08, 2020 at 04:57:13PM +0800, Herbert Xu wrote:
> On Fri, Feb 07, 2020 at 11:46:59AM +0100, Corentin Labbe wrote:
> >
> > My goal is to do like n2-crypto/rk3288crypto/etc..., fallback for init/update/final/finup and only do stuff with digest().
> > So I have just exactly copied what they do.
>
> n2 at least is totally broken wrt import/export. The other ones
> would work provided that the fallback have the same statesize as
> the generic sha implementations.
>
This behavour happen only on arm64, so it is why probably nobody (rockchip/n2) found it.
> Are you not using the standard state sizes?
I use the standard size (statesize = sizeof(struct shaxxx_state))
As a quick workaround, By simply adding (+ 8), all test pass.
>
> This should probably be switched over to lib/crypto or at least
> shash.
>
Do you mean that I should abandon ahash as a fallback ?
Powered by blists - more mailing lists