boringssl/crypto/fipsmodule/bn
David Benjamin 2d07d30c44 bn/asm/x86_64-mont5.pl: fix carry bug in bn_sqrx8x_internal.
Credit to OSS-Fuzz for finding this.

CVE-2017-3736

(Imported from upstream's 668a709a8d7ea374ee72ad2d43ac72ec60a80eee and
420b88cec8c6f7c67fad07bf508dcccab094f134.)

This bug does not affect BoringSSL as we do not enable the ADX code.
Note the test vector had to be tweaked to take things in and out of
Montgomery form. (There may be something to be said for test vectors for
just BN_mod_mul_montgomery, though we'd need separate 64-bit and 32-bit
ones because R can be different.)

Change-Id: I832070731ac1c5f893f9c1746892fc4a32f023f5
Reviewed-on: https://boringssl-review.googlesource.com/22484
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
2017-11-02 17:07:57 +00:00
..
asm bn/asm/x86_64-mont5.pl: fix carry bug in bn_sqrx8x_internal. 2017-11-02 17:07:57 +00:00
add.c Clear no-op BN_MASK2 masks. 2017-10-27 02:38:45 +00:00
bn_test_to_fuzzer.go Generate bn_div and bn_mod_exp corpus from bn_tests.txt. 2017-10-27 18:57:48 +00:00
bn_test.cc Handle malloc failures better in bn_test.cc. 2017-10-30 18:53:48 +00:00
bn_tests.txt bn/asm/x86_64-mont5.pl: fix carry bug in bn_sqrx8x_internal. 2017-11-02 17:07:57 +00:00
bn.c Remove redundant calls to |OPENSSL_cleanse| and |OPENSSL_realloc_clean|. 2017-09-18 19:16:51 +00:00
bytes.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
check_bn_tests.go Move bn/ into crypto/fipsmodule/ 2017-05-01 22:51:25 +00:00
cmp.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
ctx.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
div.c Clear no-op BN_MASK2 masks. 2017-10-27 02:38:45 +00:00
exponentiation.c Clear no-op BN_MASK2 masks. 2017-10-27 02:38:45 +00:00
gcd.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
generic.c Clear no-op BN_MASK2 masks. 2017-10-27 02:38:45 +00:00
internal.h Clear no-op BN_MASK2 masks. 2017-10-27 02:38:45 +00:00
jacobi.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
montgomery_inv.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
montgomery.c Clear no-op BN_MASK2 masks. 2017-10-27 02:38:45 +00:00
mul.c Clear no-op BN_MASK2 masks. 2017-10-27 02:38:45 +00:00
prime.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00
random.c Remove redundant calls to |OPENSSL_cleanse| and |OPENSSL_realloc_clean|. 2017-09-18 19:16:51 +00:00
rsaz_exp.c Move bn/ into crypto/fipsmodule/ 2017-05-01 22:51:25 +00:00
rsaz_exp.h Move bn/ into crypto/fipsmodule/ 2017-05-01 22:51:25 +00:00
shift.c Clear no-op BN_MASK2 masks. 2017-10-27 02:38:45 +00:00
sqrt.c Run the comment converter on libcrypto. 2017-08-18 21:49:04 +00:00