Skip to content
Commit ef9ac2f9 authored by Jiasheng Jiang's avatar Jiasheng Jiang Committed by Neil Horman
Browse files

test/bad_dtls_test.c: Add checks for the EVP_MD_CTX_get_size()



Add the check for the EVP_MD_CTX_get_size() to avoid integer overflow when it is implicitly casted from int to size_t in evp_pkey_ctx_store_cached_data().
The call path is do_PRF() -> EVP_PKEY_CTX_add1_tls1_prf_seed() -> evp_pkey_ctx_set1_octet_string() -> EVP_PKEY_CTX_ctrl() -> evp_pkey_ctx_store_cached_data().

Fixes: 16938284 ("Add basic test for Cisco DTLS1_BAD_VER and record replay handling")
Signed-off-by: default avatarJiasheng Jiang <jiasheng@purdue.edu>

Reviewed-by: default avatarTomas Mraz <tomas@openssl.org>
Reviewed-by: default avatarTodd Short <todd.short@me.com>
Reviewed-by: default avatarNeil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23952)
parent 99fe4c10
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment