openssl/crypto
Dr. Matthias St. Pierre f9fdb9d2f5 rand_lib.c: fix null pointer dereferences after RAND_get_rand_method() failure
RAND_get_rand_method() can return a NULL method pointer in the case of a
malloc failure, so don't dereference it without a check.

Reported-by: Zu-Ming Jiang (detected by FIFUZZ)

Fixes #10480

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/10490)
2019-12-15 15:25:18 +01:00
..
aes Fix some typos 2019-12-11 19:17:00 +01:00
aria Reorganize private crypto header files 2019-09-27 23:57:58 +02:00
asn1 [crypto/asn1/x_bignum.c] Explicit test against NULL 2019-10-16 15:41:17 +03:00
async Fix header file include guard names 2019-09-27 23:58:12 +02:00
bf Fix header file include guard names 2019-09-27 23:58:12 +02:00
bio BIO_s_connect: add an error state and use it 2019-11-05 22:17:12 +01:00
blake2 Reorganize local header files 2019-09-27 23:58:06 +02:00
bn Improve the overflow handling in rsaz_512_sqr 2019-12-06 13:36:16 +01:00
buffer Update copyright year 2018-04-03 13:57:12 +01:00
camellia Fix header file include guard names 2019-09-27 23:58:12 +02:00
cast Reorganize local header files 2019-09-27 23:58:06 +02:00
chacha chacha_enc.c: fix for EBCDIC platforms 2019-11-13 18:08:55 +01:00
cmac Reorganize private crypto header files 2019-09-27 23:57:58 +02:00
cms Fix a bundle of mischecks of return values 2019-09-30 17:19:05 +08:00
comp Reorganize local header files 2019-09-27 23:58:06 +02:00
conf conf_def.c: Avoid calling strlen() in a loop 2019-11-09 09:17:34 +01:00
ct Reorganize local header files 2019-09-27 23:58:06 +02:00
des Fix some typos 2019-12-11 19:17:00 +01:00
dh Fix potential memory leak in dh_ameth.c 2019-11-01 12:47:13 +01:00
dsa Document and add macros for additional DSA options 2019-10-15 16:04:46 +02:00
dso Reorganize local header files 2019-09-27 23:58:06 +02:00
ec ECDSA: don't clear free memory after verify. 2019-11-21 14:29:54 +10:00
engine Engine: Add NULL check. 2019-11-21 14:32:54 +10:00
err rand_lib.c: fix null pointer dereferences after RAND_get_rand_method() failure 2019-12-15 15:25:18 +01:00
evp Fix some typos 2019-12-11 19:17:00 +01:00
hmac Fix header file include guard names 2019-09-27 23:58:12 +02:00
idea Reorganize local header files 2019-09-27 23:58:06 +02:00
kdf Reorganize private crypto header files 2019-09-27 23:57:58 +02:00
lhash Reorganize local header files 2019-09-27 23:58:06 +02:00
md2
md4 md4/md5: macros should not include the line following them 2019-11-01 15:59:40 +01:00
md5 md4/md5: macros should not include the line following them 2019-11-01 15:59:40 +01:00
mdc2
modes Reorganize local header files 2019-09-27 23:58:06 +02:00
objects Fix long name of some Microsoft objects 2019-10-03 08:26:27 +10:00
ocsp Reorganize local header files 2019-09-27 23:58:06 +02:00
pem i2b_PVK(): Use Encrypt, not Decrypt 2019-11-27 20:34:13 +01:00
perlasm Update copyright year 2019-02-26 14:05:09 +00:00
pkcs7 Reorganize private crypto header files 2019-09-27 23:57:58 +02:00
pkcs12 Reorganize local header files 2019-09-27 23:58:06 +02:00
poly1305 Reorganize local header files 2019-09-27 23:58:06 +02:00
rand rand_lib.c: fix null pointer dereferences after RAND_get_rand_method() failure 2019-12-15 15:25:18 +01:00
rc2 Reorganize local header files 2019-09-27 23:58:06 +02:00
rc4 s390x assembly pack: enable clang build 2019-11-03 11:48:57 +01:00
rc5 Reorganize local header files 2019-09-27 23:58:06 +02:00
ripemd Reorganize local header files 2019-09-27 23:58:06 +02:00
rsa rsa: replace magic number '11' by RSA_PKCS1_PADDING_SIZE 2019-10-03 14:38:57 +02:00
seed Fix header file include guard names 2019-09-27 23:58:12 +02:00
sha Fix sha512_block_data_order_avx2 backtrace info 2019-11-20 14:11:24 +01:00
siphash Reorganize private crypto header files 2019-09-27 23:57:58 +02:00
sm2 Suppress an error when doing SM2 sign/verify ops 2019-10-29 20:36:05 +08:00
sm3 Reorganize local header files 2019-09-27 23:58:06 +02:00
sm4 Reorganize private crypto header files 2019-09-27 23:57:58 +02:00
srp Reorganize private crypto header files 2019-09-27 23:57:58 +02:00
stack Revert "stack/stack.c: omit redundant NULL checks." 2018-08-09 14:37:10 +01:00
store Reorganize local header files 2019-09-27 23:58:06 +02:00
ts Reorganize local header files 2019-09-27 23:58:06 +02:00
txt_db Update copyright year 2018-04-03 13:57:12 +01:00
ui UI_UTIL_wrap_read_pem_callback(): when |cb| is NULL, use PEM_def_callback 2019-11-22 15:22:37 +01:00
whrlpool Reorganize local header files 2019-09-27 23:58:06 +02:00
x509 Reorganize local header files 2019-09-27 23:58:06 +02:00
x509v3 Don't leak memory in the event of a failure in i2v_GENERAL_NAMES 2019-11-04 12:54:36 +00:00
alphacpuid.pl
arm64cpuid.pl {arm64|x86_64}cpuid.pl: add special 16-byte case to OPENSSL_memcmp. 2018-06-03 21:15:18 +02:00
arm_arch.h Fix header file include guard names 2019-09-27 23:58:12 +02:00
armcap.c Update copyright year 2019-02-26 14:05:09 +00:00
armv4cpuid.pl Update copyright year 2018-05-01 13:34:30 +01:00
build.info Use secure_getenv(3) when available. 2018-09-24 11:22:22 +10:00
c64xpluscpuid.pl
cpt_err.c Fix last(?) batch of malloc-NULL places 2018-04-26 14:02:24 -04:00
cryptlib.c Reorganize private crypto header files 2019-09-27 23:57:58 +02:00
ctype.c Reorganize private crypto header files 2019-09-27 23:57:58 +02:00
cversion.c
dllmain.c Reorganize private crypto header files 2019-09-27 23:57:58 +02:00
ebcdic.c
ex_data.c Reorganize private crypto header files 2019-09-27 23:57:58 +02:00
getenv.c Use secure_getenv(3) when available. 2018-09-24 11:22:22 +10:00
ia64cpuid.S
init.c Reorganize private crypto header files 2019-09-27 23:57:58 +02:00
LPdir_nyi.c
LPdir_unix.c Fix a -Warray-bounds gcc warning in OPENSSL_DIR_read 2019-11-09 10:51:43 +01:00
LPdir_vms.c
LPdir_win.c
LPdir_win32.c
LPdir_wince.c
mem.c Reorganize private crypto header files 2019-09-27 23:57:58 +02:00
mem_clr.c
mem_dbg.c Update copyright year 2018-02-13 13:59:25 +00:00
mem_sec.c test/secmemtest: test secure memory only if it is implemented 2018-10-05 12:23:34 +02:00
mips_arch.h Fix header file include guard names 2019-09-27 23:58:12 +02:00
o_dir.c
o_fips.c
o_fopen.c Add missing include file. 2018-09-17 12:54:20 +10:00
o_init.c
o_str.c Fix error handling at openssl_strerror_r 2019-06-18 13:58:52 +02:00
o_time.c Update copyright year 2018-04-03 13:57:12 +01:00
pariscid.pl PA-RISC assembly pack: make it work with GNU assembler for HP-UX. 2018-06-25 16:45:48 +02:00
ppc_arch.h Fix header file include guard names 2019-09-27 23:58:12 +02:00
ppccap.c Reorganize local header files 2019-09-27 23:58:06 +02:00
ppccpuid.pl Update copyright year 2019-02-26 14:05:09 +00:00
s390x_arch.h Fix header file include guard names 2019-09-27 23:58:12 +02:00
s390xcap.c Update copyright year 2019-09-10 13:56:40 +01:00
s390xcpuid.pl s390x assembly pack: add KIMD/KLMD code path for sha3/shake 2018-08-06 12:04:52 +02:00
sparc_arch.h Fix header file include guard names 2019-09-27 23:58:12 +02:00
sparccpuid.S
sparcv9cap.c
threads_none.c crypto/threads_none.c: fix syntax error in openssl_get_fork_id() 2019-09-11 10:32:03 +02:00
threads_pthread.c Update copyright year 2019-09-10 13:56:40 +01:00
threads_win.c crypto/threads_win.c: fix preprocessor indentation 2019-09-11 10:40:18 +02:00
uid.c Swap #if blocks in uid.c so target platform gets checked before host 2019-06-18 12:53:27 +10:00
vms_rms.h
x86_64cpuid.pl {arm64|x86_64}cpuid.pl: add special 16-byte case to OPENSSL_memcmp. 2018-06-03 21:15:18 +02:00
x86cpuid.pl Fix issues in ia32 RDRAND asm leading to reduced entropy 2018-03-08 10:27:49 -05:00