Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1491475

Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7

From Marcelo Cerri <marcelo.cerri@canonical.com>
Newsgroups linux.kernel
Subject Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7
Date 2016-09-26 19:50 +0200
Message-ID <slIcp-6Mu-15@gated-at.bofh.it> (permalink)
References <skJ0R-2oQ-7@gated-at.bofh.it> <skJ0R-2oQ-5@gated-at.bofh.it> <slFHz-5oB-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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@gondor.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@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Jan Stancek <jstancek@redhat.com> - 2016-09-24 02:30 +0200
  Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Marcelo Cerri <marcelo.cerri@canonical.com> - 2016-09-26 16:20 +0200
    Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Jan Stancek <jstancek@redhat.com> - 2016-09-26 20:00 +0200
  Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Herbert Xu <herbert@gondor.apana.org.au> - 2016-09-26 17:10 +0200
    Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Marcelo Cerri <marcelo.cerri@canonical.com> - 2016-09-26 19:50 +0200
      Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Herbert Xu <herbert@gondor.apana.org.au> - 2016-09-27 05:10 +0200
        Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Jan Stancek <jstancek@redhat.com> - 2016-09-27 11:10 +0200
          Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Marcelo Cerri <marcelo.cerri@canonical.com> - 2016-09-27 14:10 +0200
            Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Marcelo Cerri <marcelo.cerri@canonical.com> - 2016-09-27 21:50 +0200
              Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Herbert Xu <herbert@gondor.apana.org.au> - 2016-09-28 04:50 +0200
                Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Jan Stancek <jstancek@redhat.com> - 2016-09-28 09:50 +0200
                Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Marcelo Cerri <marcelo.cerri@canonical.com> - 2016-09-28 14:40 +0200
                Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Herbert Xu <herbert@gondor.apana.org.au> - 2016-09-28 14:50 +0200
                Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Marcelo Cerri <marcelo.cerri@canonical.com> - 2016-09-28 15:00 +0200
                Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Herbert Xu <herbert@gondor.apana.org.au> - 2016-09-28 15:20 +0200
                Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Herbert Xu <herbert@gondor.apana.org.au> - 2016-09-28 14:40 +0200
                Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Marcelo Cerri <marcelo.cerri@canonical.com> - 2016-09-28 14:30 +0200
                Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Herbert Xu <herbert@gondor.apana.org.au> - 2016-09-28 14:40 +0200
                Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com> - 2016-09-28 15:30 +0200
              Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Jan Stancek <jstancek@redhat.com> - 2016-09-28 11:00 +0200
          Re: [bug] crypto/vmx/p8_ghash memory corruption in 4.8-rc7 Herbert Xu <herbert@gondor.apana.org.au> - 2016-09-28 04:50 +0200

csiph-web