[openssl/openssl] 5fb065: Fix an assertion failure in tls_common.c

Matt Caswell noreply at github.com
Wed Jan 31 10:24:50 UTC 2024


  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: 5fb065589d3a4dfeeb6d48b0561ab3145ceb2127
      https://github.com/openssl/openssl/commit/5fb065589d3a4dfeeb6d48b0561ab3145ceb2127
  Author: Matt Caswell <matt at openssl.org>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    M ssl/ssl_lib.c

  Log Message:
  -----------
  Fix an assertion failure in tls_common.c

When we clear the record layer, we better make sure we clear all relevant
fields, otherwise we can get ourselves into an unexpected state.

Fixes #23255

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23256)


  Commit: a86714041d8a5868c629e9027e28c6d1dacde5f9
      https://github.com/openssl/openssl/commit/a86714041d8a5868c629e9027e28c6d1dacde5f9
  Author: Matt Caswell <matt at openssl.org>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    M ssl/statem/statem_lib.c

  Log Message:
  -----------
  When selecting a method ensure we use the correct client/server version

Using the client one when the server once should be used could cause a
later call to SSL_set_accept_state() to unexpectedly fail.

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23256)


  Commit: 4a0e4849af1588dfe9d7e01738acc96799b83447
      https://github.com/openssl/openssl/commit/4a0e4849af1588dfe9d7e01738acc96799b83447
  Author: Matt Caswell <matt at openssl.org>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    M ssl/record/rec_layer_s3.c
    M ssl/record/record.h
    M ssl/ssl_lib.c

  Log Message:
  -----------
  Rationalise RECORD_LAYER_clear() and clear_record_layer()

We had two functions which were very similarly named, that did almost the
same thing, but not quite. We bring the two together. Doing this also fixes
a possible bug where some data may not be correctly freed when the
RECORD_LAYER_clear() version was used.

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23256)


  Commit: fa4b1151c829b8be1d83cb49c9809d3a4f59fb03
      https://github.com/openssl/openssl/commit/fa4b1151c829b8be1d83cb49c9809d3a4f59fb03
  Author: Matt Caswell <matt at openssl.org>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    M ssl/quic/quic_tserver.c

  Log Message:
  -----------
  Free the tserver TLS object before freeing the channel

The TLS object may make callbacks into QUIC during cleanup so we must
free it first.

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23256)


  Commit: f7f2b665cf91650deb28beb1145ea3eca7df67aa
      https://github.com/openssl/openssl/commit/f7f2b665cf91650deb28beb1145ea3eca7df67aa
  Author: Matt Caswell <matt at openssl.org>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    M ssl/quic/quic_impl.c

  Log Message:
  -----------
  Free the QUIC TLS object before freeing the channel

Freeing the QUIC TLS object may make calls back into QUIC so we should
free it first.

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23256)


  Commit: 5de8c49d6c019ad93149871989b755b5cc7b821c
      https://github.com/openssl/openssl/commit/5de8c49d6c019ad93149871989b755b5cc7b821c
  Author: Matt Caswell <matt at openssl.org>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    M test/sslapitest.c

  Log Message:
  -----------
  Extend the testing of resetting/clearing an SSL connection

SSL_clear() explicitly clears an SSL object to enable it to be reused.
You can have a similar effect by calling SSL_set_accept_state() or
SSL_set_connect_state(). We extend the testing of SSL_clear() to use these
other methods. We also ensure we test the case where we have unread
bufferred data that needs to be cleared.

Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23256)


Compare: https://github.com/openssl/openssl/compare/62ecad537806...5de8c49d6c01


More information about the openssl-commits mailing list