]> 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:47:50 +0000 (15:47 +0100)
commit989ebe57a6854d8a3d8735120ccb691af2667420
tree82c419ec7e15571efb72c6e4383458115793953b
parentf13bb6ae71e4cdeabf3546d933f86b1b42c761e8
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)

(cherry picked from commit 3c22da73465f5dd211299e64f0de8786dcaf86c3)
crypto/evp/pmeth_lib.c
test/ectest.c