Segmentation fault in parent rng cleanup
authorafshinpir <afshinpir@users.noreply.github.com>
Wed, 8 Mar 2023 03:42:00 +0000 (16:42 +1300)
committerPauli <pauli@openssl.org>
Tue, 14 Mar 2023 21:30:41 +0000 (08:30 +1100)
commit6d45fd47f4849c8dc55b8dd5fa1e1b8a158774a0
treec173f1ccacf2c22da03a72cab3a46ddeabb3bee9
parenta3207163ef3d30658a41a9c9e3750ca4c5b16677
Segmentation fault in parent rng cleanup

CLA: trivial
When `cleanup_entropy()` is called to cleanup parent by calling
provided `OSSL_FUNC_rand_clear_seed_fn` method, incorrect random
context is passed to the method. So accessing that context creates
a segmentation fault. Parent context should be passed rather than
DRBG's own context.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20454)
providers/implementations/rands/drbg.c