linux/arch/x86/crypto
megha.dey@linux.intel.com 8861249c74 crypto: x86/sha1 - Fix reads beyond the number of blocks passed
It was reported that the sha1 AVX2 function(sha1_transform_avx2) is
reading ahead beyond its intended data, and causing a crash if the next
block is beyond page boundary:
http://marc.info/?l=linux-crypto-vger&m=149373371023377

This patch makes sure that there is no overflow for any buffer length.

It passes the tests written by Jan Stancek that revealed this problem:
https://github.com/jstancek/sha1-avx2-crash

I have re-enabled sha1-avx2 by reverting commit
b82ce24426

Cc: <stable@vger.kernel.org>
Fixes: b82ce24426 ("crypto: sha1-ssse3 - Disable avx2")
Originally-by: Ilya Albrekht <ilya.albrekht@intel.com>
Tested-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Megha Dey <megha.dey@linux.intel.com>
Reported-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-08-09 20:01:37 +08:00
..
sha1-mb objtool, x86: Add several functions and files to the objtool whitelist 2017-06-30 10:19:19 +02:00
sha256-mb objtool, x86: Add several functions and files to the objtool whitelist 2017-06-30 10:19:19 +02:00
sha512-mb
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
aes_glue.c
aesni-intel_asm.S
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 generic gcm(aes) 2017-05-18 13:19:55 +08:00
blowfish-x86_64-asm_64.S
blowfish_glue.c
camellia-aesni-avx-asm_64.S
camellia-aesni-avx2-asm_64.S
camellia-x86_64-asm_64.S
camellia_aesni_avx2_glue.c
camellia_aesni_avx_glue.c
camellia_glue.c
cast5-avx-x86_64-asm_64.S
cast5_avx_glue.c
cast6-avx-x86_64-asm_64.S
cast6_avx_glue.c
chacha20-avx2-x86_64.S
chacha20-ssse3-x86_64.S
chacha20_glue.c
crc32-pclmul_asm.S
crc32-pclmul_glue.c
crc32c-intel_glue.c
crc32c-pcl-intel-asm_64.S
crct10dif-pcl-asm_64.S
crct10dif-pclmul_glue.c
des3_ede-asm_64.S
des3_ede_glue.c
fpu.c
ghash-clmulni-intel_asm.S
ghash-clmulni-intel_glue.c
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 objtool, x86: Add several functions and files to the objtool whitelist 2017-06-30 10:19:19 +02:00
poly1305-avx2-x86_64.S
poly1305-sse2-x86_64.S
poly1305_glue.c
salsa20-i586-asm_32.S
salsa20-x86_64-asm_64.S
salsa20_glue.c
serpent-avx-x86_64-asm_64.S
serpent-avx2-asm_64.S
serpent-sse2-i586-asm_32.S
serpent-sse2-x86_64-asm_64.S
serpent_avx2_glue.c
serpent_avx_glue.c
serpent_sse2_glue.c
sha1_avx2_x86_64_asm.S crypto: x86/sha1 - Fix reads beyond the number of blocks passed 2017-08-09 20:01:37 +08:00
sha1_ni_asm.S
sha1_ssse3_asm.S
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
sha256-avx2-asm.S
sha256-ssse3-asm.S
sha256_ni_asm.S
sha256_ssse3_glue.c
sha512-avx-asm.S
sha512-avx2-asm.S
sha512-ssse3-asm.S
sha512_ssse3_glue.c
twofish-avx-x86_64-asm_64.S
twofish-i586-asm_32.S
twofish-x86_64-asm_64-3way.S
twofish-x86_64-asm_64.S
twofish_avx_glue.c
twofish_glue.c
twofish_glue_3way.c