]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix EVP_PKEY_CTX_dup() so that it copies the keymanager.
authorslontis <shane.lontis@oracle.com>
Wed, 9 Apr 2025 00:05:09 +0000 (10:05 +1000)
committerMatt Caswell <matt@openssl.org>
Tue, 15 Apr 2025 14:44:58 +0000 (15:44 +0100)
commit3c22da73465f5dd211299e64f0de8786dcaf86c3
tree617eeff3590f24db1f1af1cf983db23a2ebf4da8
parentcb3fde9728b9deed1ab2fb37dbe1021a471066e0
Fix EVP_PKEY_CTX_dup() so that it copies the keymanager.

A call to EVP_PKEY_CTX_new() creates a keymgmt pointer internally,
but EVP_PKEY_CTX_dup() does not copy this field.

Calling EVP_PKEY_derive_set_peer_ex() after EVP_PKEY_CTX_dup() resulted
in a segfault because it tried to access this pointer.

EVP_PKEY_CTX_dup() has been updated to copy the keymanager (and upref it).

Reported by Eamon ODea (Oracle).

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/27304)
crypto/evp/pmeth_lib.c
test/ectest.c