[openssl/openssl] 0151e7: Fix a possible memory leak in sxnet_v2i

Bernd Edlinger noreply at github.com
Wed Jan 10 17:02:02 UTC 2024


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 0151e772195fc03cce0f12e5e266e51dc15243a0
      https://github.com/openssl/openssl/commit/0151e772195fc03cce0f12e5e266e51dc15243a0
  Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
  Date:   2024-01-10 (Wed, 10 Jan 2024)

  Changed paths:
    M crypto/x509/v3_sxnet.c

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

When a subsequent call to SXNET_add_id_asc fails
e.g. because user is a string larger than 64 char
or the zone is a duplicate zone id,
or the zone is not an integer,
a memory leak may be the result.

Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23234)


  Commit: 398011848468c7e8e481b295f7904afc30934217
      https://github.com/openssl/openssl/commit/398011848468c7e8e481b295f7904afc30934217
  Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
  Date:   2024-01-10 (Wed, 10 Jan 2024)

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

  Log Message:
  -----------
  Fix a similar memory leak in SXNET_add_id_INTEGER

Even in the good case there was memory leak here.
Add a simple test case to have at least some test coverage.

Reviewed-by: Matt Caswell <matt at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23234)


Compare: https://github.com/openssl/openssl/compare/1d1ca79fe35d...398011848468


More information about the openssl-commits mailing list