openssl/crypto
Tomas Mraz 9eafb53614 Fix possible infinite loop in BN_mod_sqrt()
The calculation in some cases does not finish for non-prime p.

This fixes CVE-2022-0778.

Based on patch by David Benjamin <davidben@google.com>.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
2022-03-15 13:15:12 +00:00
..
aes Use Perl to generate bsaes-armv8.S 2022-03-09 17:50:03 +01:00
aria fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00
asn1 asn1_string_to_time_t: Use timegm on FreeBSD. 2022-03-03 13:33:12 +00:00
async async_posix: Make ASYNC_set_mem_functions threadsafe 2022-03-10 13:54:07 +00:00
bf
bio Add TFO support to socket BIO and s_client/s_server 2022-03-10 10:42:43 -05:00
bn Fix possible infinite loop in BN_mod_sqrt() 2022-03-15 13:15:12 +00:00
buffer
camellia Update copyright year 2021-07-29 15:41:35 +01:00
cast
chacha Fixed conditional statement testing 64 and 256 bytes 2022-03-14 09:36:24 +01:00
cmac EVP_Cipher: fix the incomplete return check 2021-11-16 17:28:23 +01:00
cmp OSSL_CMP_CTX_setup_CRM(): Fix handling of defaults from CSR and refcert 2022-03-12 09:05:02 +01:00
cms enable CMS sign/verify for provider-implemented PKEYs 2022-03-03 13:30:45 +01:00
comp Fix coverity 1493364 & 1493375: unchecked return value 2021-11-08 08:55:32 +10:00
conf Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
crmf Fix the return check of OBJ_obj2txt 2021-11-22 11:17:48 +01:00
ct
des Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
dh Replace size check with more meaningful pubkey check 2022-02-07 16:32:40 +01:00
dsa Fix EVP todata and fromdata when used with selection of EVP_PKEY_PUBLIC_KEY. 2022-02-03 13:48:42 +01:00
dso Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
ec Apply the correct Apache v2 license 2022-02-14 10:08:21 +01:00
encode_decode check the return of OPENSSL_sk_new_null 2022-03-10 14:28:06 +00:00
engine Check for presence of 1.1.x openssl runtime 2022-02-08 13:26:13 +01:00
err Add TFO support to socket BIO and s_client/s_server 2022-03-10 10:42:43 -05:00
ess
evp Fix signed integer overflow in evp_enc 2022-03-15 13:05:40 +01:00
ffc Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
hmac Adapt other parts of the source to the changed EVP_Q_digest() and EVP_Q_mac() 2021-06-23 23:00:36 +02:00
http Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
idea
kdf
lhash lhash: Avoid 32 bit right shift of a 32 bit value 2022-01-27 10:36:57 +01:00
md2
md4
md5 Update copyright year 2021-07-29 15:41:35 +01:00
mdc2
modes aes-gcm-avx512.pl: Fixed mingw64 build 2022-03-14 17:08:27 +01:00
objects Add testing of OBJ_find_sigid_by_algs() 2022-03-03 13:32:48 +01:00
ocsp add OSSL_STACK_OF_X509_free() for commonly used pattern 2021-12-21 12:11:49 +01:00
pem crypto/pem/pem_lib.c: Add check for BIO_read 2022-03-14 09:57:12 +01:00
perlasm aes-gcm-avx512.pl: Fixed mingw64 build 2022-03-14 17:08:27 +01:00
pkcs7 Fix malloc failure handling of X509_ALGOR_set0() 2022-01-14 18:47:20 +01:00
pkcs12 add OSSL_STACK_OF_X509_free() for commonly used pattern 2021-12-21 12:11:49 +01:00
poly1305 Don't use __ARMEL__/__ARMEB__ in aarch64 assembly 2022-01-09 07:40:44 +01:00
property fetch: convert a NULL property query to "" 2022-02-28 16:20:33 +11:00
rand rand: Add missing check for rand_get_global 2022-02-20 13:09:27 +01:00
rc2
rc4
rc5
ripemd
rsa rsa: add check after calling BN_BLINDING_lock 2022-02-08 15:22:35 +01:00
seed
sha Fix outdated comments 2022-02-10 13:52:17 +01:00
siphash
sm2 Add missing check according to SM2 Digital Signature generation algorithm 2021-11-02 12:02:56 +01:00
sm3 Fix sm3ss1 translation issue in sm3-armv8.pl 2022-01-20 12:50:20 +11:00
sm4 SM4 optimization for non-asm mode 2022-03-03 13:19:55 +01:00
srp fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00
stack Fix Coverity 1493746: constant expression result 2021-11-17 08:15:35 +10:00
store fetch: convert a NULL property query to "" 2022-02-28 16:20:33 +11:00
ts Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
txt_db
ui Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
whrlpool
x509 Avoid potential memory leak 2022-03-10 14:10:53 +00:00
alphacpuid.pl
arm64cpuid.pl aarch64: fix branch target indications in arm64cpuid.pl and keccak1600 2022-02-09 13:24:31 +11:00
arm_arch.h Optimize AES-GCM for uarchs with unroll and new instructions 2022-01-25 14:30:00 +11:00
armcap.c Optimize AES-GCM for uarchs with unroll and new instructions 2022-01-25 14:30:00 +11:00
armv4cpuid.pl
asn1_dsa.c
bsearch.c
build.info Statically link the legacy provider to endecode_test 2022-01-11 11:00:21 +00:00
c64xpluscpuid.pl
context.c Add missing CRYPTO_THREAD_cleanup_local of default_context_thread_local 2022-02-04 08:59:08 +01:00
core_algorithm.c CORE: add a provider argument to ossl_method_construct() 2021-10-27 12:41:10 +02:00
core_fetch.c CORE: Encure that cached fetches can be done per provider 2021-10-27 12:41:15 +02:00
core_namemap.c Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
cpt_err.c err: add additional errors 2022-01-12 20:10:21 +11:00
cpuid.c Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
cryptlib.c Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
ctype.c
cversion.c
der_writer.c
dllmain.c Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
ebcdic.c
ex_data.c
getenv.c Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
ia64cpuid.S
info.c Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
init.c Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
initthread.c Avoid a race in init_thread_stop() 2021-11-12 17:16:14 +00:00
LPdir_nyi.c
LPdir_unix.c fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00
LPdir_vms.c
LPdir_win32.c
LPdir_win.c
LPdir_wince.c
mem_clr.c
mem_sec.c Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
mem.c Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
mips_arch.h
o_dir.c Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
o_fopen.c Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
o_init.c Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
o_str.c Change strlen' argument name to strlength' to avoid c++ reserved words. 2022-02-28 16:24:27 +11:00
o_time.c
packet.c
param_build_set.c param build set: add errors to failure returns 2022-01-12 20:10:21 +11:00
param_build.c Add support for signed BIGNUMs in the OSSL_PARAM_BLD API 2022-01-26 21:35:39 +01:00
params_dup.c Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
params_from_text.c Allow sign extension in OSSL_PARAM_allocate_from_text() 2021-11-24 19:18:19 +01:00
params.c Add support for signed BIGNUMs in the OSSL_PARAM API 2022-01-26 21:35:39 +01:00
pariscid.pl
passphrase.c Fix invalid malloc failures in PEM_write_bio_PKCS8PrivateKey() 2022-01-26 17:15:52 +01:00
ppccap.c chacha20 performance optimizations for ppc64le with 8x lanes, 2022-02-22 16:58:55 +11:00
ppccpuid.pl chacha20 performance optimizations for ppc64le with 8x lanes, 2022-02-22 16:58:55 +11:00
provider_child.c Stop receiving child callbacks in a child libctx when appropriate 2021-11-12 17:16:14 +00:00
provider_conf.c Refactor: a separate func for provider activation from config 2021-12-01 15:49:38 +01:00
provider_core.c ossl_provider_add_to_store: Avoid use-after-free 2021-12-17 17:33:49 +01:00
provider_local.h make struct provider_info_st a full type 2021-06-24 14:48:15 +01:00
provider_predefined.c make struct provider_info_st a full type 2021-06-24 14:48:15 +01:00
provider.c Correctly activate the provider in OSSL_PROVIDER_try_load 2021-11-12 17:16:14 +00:00
punycode.c Move more general parts of internal/cryptlib.h to new internal/common.h 2021-11-17 15:48:37 +01:00
README-sparse_array.md
s390x_arch.h Add default provider support for Keccak 224, 256, 384 and 512 2021-09-23 12:07:57 +10:00
s390xcap.c
s390xcpuid.pl
self_test_core.c
sparccpuid.S
sparcv9cap.c Split bignum code out of the sparcv9cap.c 2021-07-15 09:33:04 +02:00
sparse_array.c
threads_lib.c
threads_none.c
threads_pthread.c Some platforms don't have pthread_atfork 2022-03-10 13:22:28 +11:00
threads_win.c Explicitly #include <synchapi.h> is unnecessary 2021-09-23 14:07:18 +02:00
trace.c Move e_os.h to include/internal 2022-02-05 05:31:09 +01:00
uid.c Openssl fails to compile on Debian with kfreebsd kernels 2021-09-02 10:02:32 +10:00
vms_rms.h
x86_64cpuid.pl
x86cpuid.pl