-
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 b82ce244 Cc: <stable@vger.kernel.org> Fixes: b82ce244 ("crypto: sha1-ssse3 - Disable avx2") Originally-by: NIlya Albrekht <ilya.albrekht@intel.com> Tested-by: NJan Stancek <jstancek@redhat.com> Signed-off-by: NMegha Dey <megha.dey@linux.intel.com> Reported-by: NJan Stancek <jstancek@redhat.com> Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
8861249c