drbg: fix issue where DRBG_CTR fails if NO_DF is used (2nd attempt)
authorDr. Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Thu, 30 May 2019 16:37:29 +0000 (18:37 +0200)
committerMatt Caswell <matt@openssl.org>
Mon, 9 Sep 2019 16:09:06 +0000 (17:09 +0100)
commit63180182ecfe6474fbc50bc4021e558d11414e88
tree0e7e4960b2aa06d8d106b3c16267419a0229bf78
parent5520695c733f7e6577a8b06e5ed3e34aa48df19a
drbg: fix issue where DRBG_CTR fails if NO_DF is used (2nd attempt)

Since commit 7c226dfc434d a chained DRBG does not add additional
data anymore when reseeding from its parent. The reason is that
the size of the additional data exceeded the allowed size when
no derivation function was used.

This commit provides an alternative fix: instead of adding the
entire DRBG's complete state, we just add the DRBG's address
in memory, thereby providing some distinction between the different
DRBG instances.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9802)
crypto/rand/rand_lib.c