[openssl/openssl] b9a86d: Fix possible null pointer dereference of evp_pkey_...

Tomas Mraz noreply at reply.github.openssl.org
Thu Jun 2 10:06:34 UTC 2022

  Branch: refs/heads/master
  Home:   https://github.openssl.org/openssl/openssl
  Commit: b9a86d5dd8b5bd33be42390bcbb5121fe0ae71a1
  Author: Zhou Qingyang <zhou1615 at umn.edu>
  Date:   2022-06-02 (Thu, 02 Jun 2022)

  Changed paths:
    M crypto/dh/dh_ameth.c
    M crypto/ec/ecx_meth.c
    M crypto/evp/p_dec.c
    M crypto/evp/p_enc.c

  Log Message:
  Fix possible null pointer dereference of evp_pkey_get_legacy()

evp_pkey_get_legacy() will return NULL on failure, however several
uses of it or its wrappers does not check the return value of
evp_pkey_get_legacy(), which could lead to NULL pointer dereference.

Fix those possible bugs by adding NULL checking.

Reviewed-by: Shane Lontis <shane.lontis at oracle.com>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17967)

More information about the openssl-commits mailing list