[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160926174317.GA21317@gallifrey>
Date: Mon, 26 Sep 2016 14:43:17 -0300
From: Marcelo Cerri <marcelo.cerri@...onical.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Jan Stancek <jstancek@...hat.com>, rui.y.wang@...el.com,
mhcerri@...ux.vnet.ibm.com, leosilva@...ux.vnet.ibm.com,
pfsmorigo@...ux.vnet.ibm.com, linux-crypto@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7
Herbert,
Wouldn't be enough to provide a pair of import/export functions as the
padlock-sha driver does?
--
Regards,
Marcelo
On Mon, Sep 26, 2016 at 10:59:34PM +0800, Herbert Xu wrote:
> On Fri, Sep 23, 2016 at 08:22:27PM -0400, Jan Stancek wrote:
> >
> > This seems to directly correspond with:
> > p8_ghash_alg.descsize = sizeof(struct p8_ghash_desc_ctx) == 56
> > shash_tfm->descsize = sizeof(struct p8_ghash_desc_ctx) + crypto_shash_descsize(fallback) == 56 + 20
> > where 20 is presumably coming from "ghash_alg.descsize".
> >
> > My gut feeling was that these 2 should match, but I'd love to hear
> > what crypto people think.
>
> Indeed. The vmx driver is broken. It is allocating a fallback
> but is not providing any space for the state of the fallback.
>
> Unfortunately our interface doesn't really provide a way to provide
> the state size dynamically. So what I'd suggest is to fix the
> fallback to the generic ghash implementation and export its state
> size like we do for md5/sha.
>
> Cheers,
> --
> Email: Herbert Xu <herbert@...dor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
> --
> To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists