]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
crypto: vmac - require a block cipher with 128-bit block size
authorEric Biggers <ebiggers@google.com>
Mon, 18 Jun 2018 17:22:37 +0000 (10:22 -0700)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:42:08 +0000 (19:42 -0600)
commitd837947947ef5074772cc52a1acb51322a612847
tree74adc23e7883443807f3b2d75446e8fb52f4219a
parent96dcf5604543f41f57696257c6af81aeaaf6d737
crypto: vmac - require a block cipher with 128-bit block size

BugLink: https://bugs.launchpad.net/bugs/1835845
commit 73bf20ef3df262026c3470241ae4ac8196943ffa upstream.

The VMAC template assumes the block cipher has a 128-bit block size, but
it failed to check for that.  Thus it was possible to instantiate it
using a 64-bit block size cipher, e.g. "vmac(cast5)", causing
uninitialized memory to be used.

Add the needed check when instantiating the template.

Fixes: f1939f7c5645 ("crypto: vmac - New hash algorithm for intel_txt support")
Cc: <stable@vger.kernel.org> # v2.6.32+
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
crypto/vmac.c