crypto: vmx - Fix memory corruption caused by p8_ghash
authorMarcelo Cerri <marcelo.cerri@canonical.com>
Wed, 28 Sep 2016 16:42:10 +0000 (13:42 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Oct 2016 10:06:49 +0000 (12:06 +0200)
commitc2a55c3a891ce8b6c1d06698f9b6d946db29a9f5
treed489ea60d8496f707a6093d70cc7700756a71140
parent826ed40808d591456d94b39498c43b0c8bf88bb7
crypto: vmx - Fix memory corruption caused by p8_ghash

commit 80da44c29d997e28c4442825f35f4ac339813877 upstream.

This patch changes the p8_ghash driver to use ghash-generic as a fixed
fallback implementation. This allows the correct value of descsize to be
defined directly in its shash_alg structure and avoids problems with
incorrect buffer sizes when its state is exported or imported.

Reported-by: Jan Stancek <jstancek@redhat.com>
Fixes: cc333cd68dfa ("crypto: vmx - Adding GHASH routines for VMX module")
Signed-off-by: Marcelo Cerri <marcelo.cerri@canonical.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/vmx/ghash.c