[openssl/openssl] 11e85b: err: fix crash in ERR_load_strings() when configur...

mspncp noreply at reply.github.openssl.org
Tue May 10 07:50:41 UTC 2022


  Branch: refs/heads/master
  Home:   https://github.openssl.org/openssl/openssl
  Commit: 11e85b8941cb6f728e37f15502f26e67231db6b6
      https://github.openssl.org/openssl/openssl/commit/11e85b8941cb6f728e37f15502f26e67231db6b6
  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)


  Commit: 1c8787d5e0b01bedfc3cbe5eab5b85290221d8c1
      https://github.openssl.org/openssl/openssl/commit/1c8787d5e0b01bedfc3cbe5eab5b85290221d8c1
  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)


Compare: https://github.openssl.org/openssl/openssl/compare/3b8363856795...1c8787d5e0b0


More information about the openssl-commits mailing list