]> git.ipfire.org Git - thirdparty/openssl.git/commit
rands/drbg_hash.c: Add checks for the EVP_MD_get_size()
authorJiasheng Jiang <jiasheng@purdue.edu>
Fri, 22 Mar 2024 19:51:28 +0000 (19:51 +0000)
committerNeil Horman <nhorman@openssl.org>
Tue, 2 Apr 2024 09:07:02 +0000 (05:07 -0400)
commit68d6dd3354597de01e7a9534be813756004e1351
tree745665565f27013384c3415ad695223eaf62a323
parent5f8b812931e5da24df08913c05ff8e4f4494f014
rands/drbg_hash.c: Add checks for the EVP_MD_get_size()

Add checks for the EVP_MD_get_size() to avoid integer overflow and then explicitly cast from int to size_t.

Fixes: 8bf3665196 ("Added DRBG_HMAC & DRBG_HASH + Added defaults for setting DRBG for master/public/private + renamed generate_counter back to reseed_counter + generated new cavs data tests")
Signed-off-by: Jiasheng Jiang <jiasheng@purdue.edu>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23944)
providers/implementations/rands/drbg_hash.c