[openssl/openssl] 31c695: Fix a possible memory leak in do_othername

Bernd Edlinger noreply at github.com
Tue Dec 12 12:47:55 UTC 2023


  Branch: refs/heads/openssl-3.0
  Home:   https://github.com/openssl/openssl
  Commit: 31c695c3876b00a26d5caef5e0735329c36ff7b1
      https://github.com/openssl/openssl/commit/31c695c3876b00a26d5caef5e0735329c36ff7b1
  Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
  Date:   2023-12-12 (Tue, 12 Dec 2023)

  Changed paths:
    M crypto/x509/v3_san.c
    M test/recipes/25-test_req.t

  Log Message:
  -----------
  Fix a possible memory leak in do_othername

Since the gen->type will not be set in a2i_GENERAL_NAME
the gen->d.otherName will not be automatically
cleaned up by GENERAL_NAME_free.
Also fixed a similar leak in a2i_GENERAL_NAME,
where ASN1_STRING_set may fail but gen->d.ia5
will not be automatically cleaned up.

Reviewed-by: Shane Lontis <shane.lontis at oracle.com>
Reviewed-by: Tom Cosgrove <tom.cosgrove at arm.com>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22996)

(cherry picked from commit 1c078212f1548d7f647a1f0f12ed6df257c85cc3)




More information about the openssl-commits mailing list