openssl/crypto/rand
Bernd Edlinger 79f5e2f4b9 Fix a potential crash in rand_unix.c
Due to the dynamic allocation that was added to rand_pool_add_begin
this function could now return a null pointer where it was previously
guaranteed to succeed. But the return value of this function does
not need to be checked by design.

Move rand_pool_grow from rand_pool_add_begin to rand_pool_bytes_needed.
Make an allocation error persistent to avoid falling back to less secure
or blocking entropy sources.

Fixes: a6a66e4511 ("Make rand_pool buffers more dynamic in their sizing.")

Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9687)

(cherry picked from commit fa3eb248e29ca8031e6a14e8a2c6f3cd58b5450e)
2019-09-10 10:03:04 +01:00
..
build.info crypto/rand: rename drbg_rand.c to drbg_ctr.c 2018-01-04 11:47:30 +10:00
drbg_ctr.c DRBG: fix reseeding via RAND_add()/RAND_seed() with large input 2018-10-16 22:32:42 +02:00
drbg_lib.c drbg: ensure fork-safety without using a pthread_atfork handler 2019-09-09 17:09:06 +01:00
rand_egd.c Update copyright year 2018-05-29 13:16:04 +01:00
rand_err.c Make rand_pool buffers more dynamic in their sizing. 2019-07-23 23:30:12 +10:00
rand_lcl.h drbg: ensure fork-safety without using a pthread_atfork handler 2019-09-09 17:09:06 +01:00
rand_lib.c Fix a potential crash in rand_unix.c 2019-09-10 10:03:04 +01:00
rand_unix.c Fix a strict warnings error in rand_pool_acquire_entropy 2019-09-10 10:03:04 +01:00
rand_vms.c Update copyright year 2019-05-28 14:49:38 +02:00
rand_win.c Fix build with VS2008 2019-09-09 16:45:22 +02:00
randfile.c Update copyright year 2019-05-28 14:49:38 +02:00