[openssl/openssl] 4d50a5: Fix wild pointer dereference in make_ocsp_response()

Tomas Mraz noreply at reply.github.openssl.org
Thu Apr 21 06:10:02 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.openssl.org/openssl/openssl
  Commit: 4d50a5467b0a208c61d163239a3544bae06343ea
      https://github.openssl.org/openssl/openssl/commit/4d50a5467b0a208c61d163239a3544bae06343ea
  Author: Zhou Qingyang <zhou1615 at umn.edu>
  Date:   2022-04-21 (Thu, 21 Apr 2022)

  Changed paths:
    M apps/ocsp.c

  Log Message:
  -----------
  Fix wild pointer dereference in make_ocsp_response()

The function OCSP_basic_add1_status() will return NULL on malloc failure.
However the return value is not checked before being passed to
OCSP_SINGLERESP_add1_ext_i2d(), and there is a wild field pointer,
which could lead to wild pointer dereference.

Fix this by adding return value check

Reviewed-by: Kurt Roeckx <kurt at roeckx.be>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18081)




More information about the openssl-commits mailing list