linux-stable/arch/x86/crypto
Eric Biggers 43ea178b12 crypto: x86/crct10dif-pcl - fix use via crypto_shash_digest()
commit dec3d0b107 upstream.

The ->digest() method of crct10dif-pclmul reads the current CRC value
from the shash_desc context.  But this value is uninitialized, causing
crypto_shash_digest() to compute the wrong result.  Fix it.

Probably this wasn't noticed before because lib/crc-t10dif.c only uses
crypto_shash_update(), not crypto_shash_digest().  Likewise,
crypto_shash_digest() is not yet tested by the crypto self-tests because
those only test the ahash API which only uses shash init/update/final.

Fixes: 0b95a7f857 ("crypto: crct10dif - Glue code to cast accelerated CRCT10DIF assembly as a crypto transform")
Cc: <stable@vger.kernel.org> # v3.11+
Cc: Tim Chen <tim.c.chen@linux.intel.com>
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>
2019-05-21 18:50:15 +02:00
..
sha1-mb Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-11-06 09:05:03 -08:00
sha256-mb crypto: x86/sha256-mb - fix digest copy in sha256_mb_mgr_get_comp_job_avx2() 2018-08-17 21:01:10 +02:00
sha512-mb crypto: sha512-mb - initialize pending lengths correctly 2018-02-16 20:23:02 +01:00
aes-i586-asm_32.S
aes-x86_64-asm_64.S crypto: x86/aes - Don't use %rbp as temporary register 2017-05-23 12:52:05 +08:00
aes_ctrby8_avx-x86_64.S crypto, x86: aesni - fix token pasting for clang 2017-03-24 22:02:55 +08:00
aes_glue.c
aesni-intel_asm.S crypto: aesni - Fix out-of-bounds access of the AAD buffer in generic-gcm-aesni 2018-02-03 17:38:50 +01:00
aesni-intel_avx-x86_64.S crypto: aesni - make AVX2 AES-GCM work with all valid auth_tag_len 2017-05-18 13:19:55 +08:00
aesni-intel_glue.c crypto: aesni - add wrapper for generic gcm(aes) 2018-02-03 17:38:49 +01:00
blowfish-x86_64-asm_64.S crypto: x86/blowfish - Fix RBP usage 2017-09-20 17:42:31 +08:00
blowfish_glue.c crypto: algapi - make crypto_xor() take separate dst and src arguments 2017-08-04 09:27:15 +08:00
camellia-aesni-avx-asm_64.S x86/retpoline/crypto: Convert crypto assembler indirect jumps 2018-01-17 09:45:29 +01:00
camellia-aesni-avx2-asm_64.S x86/retpoline/crypto: Convert crypto assembler indirect jumps 2018-01-17 09:45:29 +01:00
camellia-x86_64-asm_64.S crypto: x86/camellia - Fix RBP usage 2017-09-20 17:42:31 +08:00
camellia_aesni_avx2_glue.c x86/cpufeature: Replace cpu_has_avx with boot_cpu_has() usage 2016-04-13 11:37:40 +02:00
camellia_aesni_avx_glue.c x86/cpufeature: Replace cpu_has_avx with boot_cpu_has() usage 2016-04-13 11:37:40 +02:00
camellia_glue.c crypto: gf128mul - switch gf128mul_x_ble to le128 2017-04-05 21:58:37 +08:00
cast5-avx-x86_64-asm_64.S crypto: x86/cast5 - Fix RBP usage 2017-09-20 17:42:32 +08:00
cast5_avx_glue.c crypto: x86/cast5-avx - fix ECB encryption when long sg follows short one 2018-04-08 14:26:32 +02:00
cast6-avx-x86_64-asm_64.S crypto: x86/cast6 - Fix RBP usage 2017-09-20 17:42:33 +08:00
cast6_avx_glue.c crypto: xts - consolidate sanity check for keys 2016-02-17 04:07:51 +08:00
chacha20-avx2-x86_64.S crypto: x86/chacha20 - satisfy stack validation 2.0 2017-10-12 22:51:16 +08:00
chacha20-ssse3-x86_64.S crypto: x86/chacha20 - satisfy stack validation 2.0 2017-10-12 22:51:16 +08:00
chacha20_glue.c crypto: x86/chacha20 - Manually align stack buffer 2017-01-13 00:26:46 +08:00
crc32-pclmul_asm.S
crc32-pclmul_glue.c crypto: hash - annotate algorithms taking optional key 2018-02-16 20:23:00 +01:00
crc32c-intel_glue.c crypto: hash - annotate algorithms taking optional key 2018-02-16 20:23:00 +01:00
crc32c-pcl-intel-asm_64.S x86/retpoline/crypto: Convert crypto assembler indirect jumps 2018-01-17 09:45:29 +01:00
crct10dif-pcl-asm_64.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
crct10dif-pclmul_glue.c crypto: x86/crct10dif-pcl - fix use via crypto_shash_digest() 2019-05-21 18:50:15 +02:00
des3_ede-asm_64.S crypto: x86/des3_ede - Fix RBP usage 2017-09-20 17:42:34 +08:00
des3_ede_glue.c crypto: algapi - make crypto_xor() take separate dst and src arguments 2017-08-04 09:27:15 +08:00
fpu.c crypto: aesni - Convert to skcipher 2016-11-28 21:23:20 +08:00
ghash-clmulni-intel_asm.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
ghash-clmulni-intel_glue.c crypto: ghash-clmulni - Fix cryptd reordering 2016-06-23 18:29:53 +08:00
glue_helper-asm-avx.S
glue_helper-asm-avx2.S
glue_helper.c crypto: glue_helper - Delete some dead code 2017-06-19 14:11:54 +08:00
Makefile crypto: x86/salsa20 - remove x86 salsa20 implementations 2018-07-17 11:39:31 +02:00
poly1305-avx2-x86_64.S crypto: x86/poly1305 - fix overflow during partial reduction 2019-04-27 09:35:37 +02:00
poly1305-sse2-x86_64.S crypto: x86/poly1305 - fix overflow during partial reduction 2019-04-27 09:35:37 +02:00
poly1305_glue.c crypto: poly1305 - remove ->setkey() method 2018-02-16 20:23:00 +01:00
serpent-avx-x86_64-asm_64.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
serpent-avx2-asm_64.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
serpent-sse2-i586-asm_32.S
serpent-sse2-x86_64-asm_64.S
serpent_avx2_glue.c x86/cpufeature: Replace cpu_has_avx2 with boot_cpu_has() usage 2016-04-13 11:37:39 +02:00
serpent_avx_glue.c crypto: xts - consolidate sanity check for keys 2016-02-17 04:07:51 +08:00
serpent_sse2_glue.c crypto: gf128mul - switch gf128mul_x_ble to le128 2017-04-05 21:58:37 +08:00
sha1_avx2_x86_64_asm.S crypto: x86/sha1-avx2 - Fix RBP usage 2017-09-20 17:42:34 +08:00
sha1_ni_asm.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
sha1_ssse3_asm.S crypto: x86/sha1-ssse3 - Fix RBP usage 2017-09-20 17:42:35 +08:00
sha1_ssse3_glue.c crypto: x86/sha1 - Fix reads beyond the number of blocks passed 2017-08-09 20:01:37 +08:00
sha256-avx-asm.S crypto: x86/sha256-avx - Fix RBP usage 2017-09-20 17:42:36 +08:00
sha256-avx2-asm.S crypto: x86/sha256-avx2 - Fix RBP usage 2017-09-20 17:42:36 +08:00
sha256-ssse3-asm.S crypto: x86/sha256-ssse3 - Fix RBP usage 2017-09-20 17:42:37 +08:00
sha256_ni_asm.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
sha256_ssse3_glue.c crypto: sha-ssse3 - add MODULE_ALIAS 2016-05-31 16:41:46 +08:00
sha512-avx-asm.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
sha512-avx2-asm.S crypto: sha512-avx2 - Fix RBP usage 2017-09-20 17:42:37 +08:00
sha512-ssse3-asm.S crypto: x86 - make constants readonly, allow linker to merge them 2017-01-23 22:50:29 +08:00
sha512_ssse3_glue.c crypto: sha-ssse3 - add MODULE_ALIAS 2016-05-31 16:41:46 +08:00
twofish-avx-x86_64-asm_64.S crypto: x86/twofish - Fix RBP usage 2017-09-20 17:42:38 +08:00
twofish-i586-asm_32.S
twofish-x86_64-asm_64-3way.S crypto: x86/twofish-3way - Fix %rbp usage 2018-02-25 11:07:49 +01:00
twofish-x86_64-asm_64.S x86/asm: Replace "MOVQ $imm, %reg" with MOVL 2015-04-01 13:17:39 +02:00
twofish_avx_glue.c x86/fpu: Fixup uninitialized feature_name warning 2015-09-24 09:21:20 +02:00
twofish_glue.c
twofish_glue_3way.c crypto: gf128mul - switch gf128mul_x_ble to le128 2017-04-05 21:58:37 +08:00