]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: x86/cast5-avx - fix ECB encryption when long sg follows short one
authorEric Biggers <ebiggers@google.com>
Tue, 20 Feb 2018 07:48:12 +0000 (23:48 -0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 2 Mar 2018 16:03:25 +0000 (00:03 +0800)
commit44d900fa2303572ecafccf7a2745d7ddd0e1d018
treef55ec18c55ee3f3d201fc801778778e0018d046f
parent418ab951ae21c7e881b3be045336c3c4dc5479d5
crypto: x86/cast5-avx - fix ECB encryption when long sg follows short one

With ecb-cast5-avx, if a 128+ byte scatterlist element followed a
shorter one, then the algorithm accidentally encrypted/decrypted only 8
bytes instead of the expected 128 bytes.  Fix it by setting the
encryption/decryption 'fn' correctly.

Fixes: 205b35a12fa8 ("crypto: cast5/avx - avoid using temporary stack buffers")
Cc: <stable@vger.kernel.org> # v3.8+
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/x86/crypto/cast5_avx_glue.c