linux/drivers/crypto/vmx
Daniel Axtens dcf7b48212 crypto: vmx - fix copy-paste error in CTR mode
The original assembly imported from OpenSSL has two copy-paste
errors in handling CTR mode. When dealing with a 2 or 3 block tail,
the code branches to the CBC decryption exit path, rather than to
the CTR exit path.

This leads to corruption of the IV, which leads to subsequent blocks
being corrupted.

This can be detected with libkcapi test suite, which is available at
https://github.com/smuellerDD/libkcapi

Reported-by: Ondrej Mosnáček <omosnacek@gmail.com>
Fixes: 5c380d623e ("crypto: vmx - Add support for VMS instructions by ASM")
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Axtens <dja@axtens.net>
Tested-by: Michael Ellerman <mpe@ellerman.id.au>
Tested-by: Ondrej Mosnacek <omosnacek@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-03-22 20:57:28 +08:00
..
.gitignore crypto: vmx - Ignore generated files 2016-07-20 22:41:44 +08:00
aes_cbc.c crypto: vmx - Remove VLA usage of skcipher 2018-09-28 12:46:08 +08:00
aes_ctr.c crypto: vmx - Remove VLA usage of skcipher 2018-09-28 12:46:08 +08:00
aes_xts.c crypto: vmx - Remove VLA usage of skcipher 2018-09-28 12:46:08 +08:00
aes.c crypto: vmx - Remove overly verbose printk from AES init routines 2018-05-12 00:13:15 +08:00
aesp8-ppc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
aesp8-ppc.pl crypto: vmx - fix copy-paste error in CTR mode 2019-03-22 20:57:28 +08:00
ghash.c crypto: shash - remove useless setting of type flags 2018-07-09 00:30:24 +08:00
ghashp8-ppc.pl treewide: convert ISO_8859-1 text comments to utf-8 2018-08-23 18:48:43 -07:00
Kconfig crypto: vmx - Ensure ghash-generic is enabled 2016-10-02 22:33:44 +08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ppc-xlate.pl License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmx.c powerpc updates for 4.8 # 1 2016-07-30 21:01:36 -07:00