[openssl/openssl] 3e8307: err: fix crash in ERR_load_strings() when configur...

mspncp noreply at reply.github.openssl.org
Tue May 10 07:51:13 UTC 2022


  Branch: refs/heads/openssl-3.0
  Home:   https://github.openssl.org/openssl/openssl
  Commit: 3e8307924efb54274083454f3a05a7d38b54be86
      https://github.openssl.org/openssl/openssl/commit/3e8307924efb54274083454f3a05a7d38b54be86
  Author: Dr. Matthias St. Pierre <matthias.st.pierre at ncp-e.com>
  Date:   2022-05-10 (Tue, 10 May 2022)

  Changed paths:
    M crypto/err/err.c

  Log Message:
  -----------
  err: fix crash in ERR_load_strings() when configured with no-err

This commit removes the entire initialization and cleanup of the
error string hash table (`int_error_hash`) if `no-err` is configured.
The only operative function remaining is `ERR_get_next_error_library()`.
That is the reason why the `err_string_lock` and hence the
`do_err_strings_init()` function can't be removed entirely.

Fixes #17971

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17974)

(cherry picked from commit 11e85b8941cb6f728e37f15502f26e67231db6b6)


  Commit: 39f7f543738f954c9a7c0ef554e32563e241bcb9
      https://github.openssl.org/openssl/openssl/commit/39f7f543738f954c9a7c0ef554e32563e241bcb9
  Author: Dr. Matthias St. Pierre <matthias.st.pierre at ncp-e.com>
  Date:   2022-05-10 (Tue, 10 May 2022)

  Changed paths:
    M crypto/err/err.c
    M crypto/init.c
    M ssl/ssl_init.c

  Log Message:
  -----------
  err: get rid of err_free_strings_int()

Even though the function is not part of the public api, it is not
entirely removed, in order to minimize the chance of breakage,
because it is exported from libcrypto. Instead, we keep a dummy
implementation.

Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17974)

(cherry picked from commit 1c8787d5e0b01bedfc3cbe5eab5b85290221d8c1)


Compare: https://github.openssl.org/openssl/openssl/compare/b643a4df6153...39f7f543738f


More information about the openssl-commits mailing list