[openssl/openssl] 761825: Reapply "Preserve connection custom extensions in ...

"'Matt Caswell' via openssl-commits" <[email protected]>
Newsgroups gmane.comp.encryption.openssl.cvs
Message-ID <openssl/openssl/push/refs/heads/openssl-3.6/[email protected]>
  Branch: refs/heads/openssl-3.6
  Home:   https://github.com/openssl/openssl
  Commit: 7618255656f5f674373452485c08c53b1cfe8dfc
      https://github.com/openssl/openssl/commit/7618255656f5f674373452485c08c53b1cfe8dfc
  Author: Matt Caswell <[email protected]>
  Date:   2026-06-08 (Mon, 08 Jun 2026)

  Changed paths:
    M ssl/ssl_lib.c
    M ssl/ssl_local.h
    M ssl/statem/extensions_cust.c
    M test/sslapitest.c

  Log Message:
  -----------
  Reapply "Preserve connection custom extensions in SSL_set_SSL_CTX()"

This reverts commit 7836b7d5b6a6b27a441c4e4c8564be6b270580c4.

Fixes #31193

Reviewed-by: Bob Beck <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Mon Jun  8 07:51:54 2026
(Merged from https://github.com/openssl/openssl/pull/31238)

(cherry picked from commit efff9b82788c561d7033ed043f22b9a11d04b29f)


  Commit: 666179de507d7df592f9faedb576aa6ecabe44fd
      https://github.com/openssl/openssl/commit/666179de507d7df592f9faedb576aa6ecabe44fd
  Author: Matt Caswell <[email protected]>
  Date:   2026-06-08 (Mon, 08 Jun 2026)

  Changed paths:
    M ssl/statem/extensions_cust.c

  Log Message:
  -----------
  There is no need to call custom_ext_copy_old_cb after reallocing dst->meths

In custom_exts_copy_conn we realloc'd the dst->meths buffer, and then
called `custom_ext_copy_old_cb` to transfer ownership of the all style
API wrapper allocations to the newly realloc'd buffer. But this makes
no sense. The buffer is realloc'd, and the old buffer is no longer freed,
so ownership of the old style API wrapper allocations transfer as well.
This is actually a use-after-free (we can no longer access the old buffer
once its been realloc'd), and also causes a leak. We just delete this
code.

Reviewed-by: Bob Beck <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Mon Jun  8 07:51:55 2026
(Merged from https://github.com/openssl/openssl/pull/31238)

(cherry picked from commit ff08a2c6d10cdd143259619b7f8eed564713458c)


  Commit: 068e7c911ab15c9f9406367d529b948cb8043047
      https://github.com/openssl/openssl/commit/068e7c911ab15c9f9406367d529b948cb8043047
  Author: Matt Caswell <[email protected]>
  Date:   2026-06-08 (Mon, 08 Jun 2026)

  Changed paths:
    M test/sslapitest.c

  Log Message:
  -----------
  Check custom extensions are handled correct with 3rd party QUIC

We have some code to handle the case where we have custom 3rd party
extension and 3rd party QUIC. Test that this doesn't cause any problems.

Reviewed-by: Bob Beck <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Mon Jun  8 07:51:56 2026
(Merged from https://github.com/openssl/openssl/pull/31238)

(cherry picked from commit 0d6164b9f09cd3703e1d8e0cc903b5c5cac87d60)


Compare: https://github.com/openssl/openssl/compare/024c1646bd07...068e7c911ab1

To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/openssl-3.6/024c16-068e7c%40github.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.