boringssl/crypto/bn/asm
David Benjamin bf681a40d6 Fix out-of-bounds read in BN_mod_exp_mont_consttime.
bn_get_bits5 always reads two bytes, even when it doesn't need to. For some
sizes of |p|, this can result in reading just past the edge of the array.
Unroll the first iteration of the loop and avoid reading out of bounds.

Replace bn_get_bits5 altogether in C as it's not doing anything interesting.

Change-Id: Ibcc8cea7d9c644a2639445396455da47fe869a5c
Reviewed-on: https://boringssl-review.googlesource.com/1393
Reviewed-by: Adam Langley <agl@google.com>
2014-08-06 00:11:47 +00:00
..
armv4-mont.pl Add visibility rules. 2014-07-31 22:03:11 +00:00
bn-586.pl Inital import. 2014-06-20 13:17:32 -07:00
co-586.pl Inital import. 2014-06-20 13:17:32 -07:00
modexp512-x86_64.pl Inital import. 2014-06-20 13:17:32 -07:00
rsaz-avx2.pl x86_64 assembly pack: allow clang to compile AVX code. 2014-07-28 17:05:13 -07:00
rsaz-x86_64.pl x86_64 assembly pack: improve masm support. 2014-07-28 17:05:13 -07:00
x86_64-gcc.c Add needed volatile qualifications. 2014-06-20 13:17:33 -07:00
x86_64-mont5.pl Fix out-of-bounds read in BN_mod_exp_mont_consttime. 2014-08-06 00:11:47 +00:00
x86_64-mont.pl x86_64 assembly pack: improve masm support. 2014-07-28 17:05:13 -07:00
x86-mont.pl OpenSSL: make final reduction in Montgomery multiplication constant-time. 2014-06-20 13:17:33 -07:00