[openssl/openssl] 036e45: 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.5/[email protected]>
  Branch: refs/heads/openssl-3.5
  Home:   https://github.com/openssl/openssl
  Commit: 036e45f2370e0f9dcdd8b4d1059384dc04df2859
      https://github.com/openssl/openssl/commit/036e45f2370e0f9dcdd8b4d1059384dc04df2859
  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: 5ad918244f03ab6ad75198a594c8351cacd3c917
      https://github.com/openssl/openssl/commit/5ad918244f03ab6ad75198a594c8351cacd3c917
  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: 17de3d7ad1f34e51f251f3f8c77e9485239a232f
      https://github.com/openssl/openssl/commit/17de3d7ad1f34e51f251f3f8c77e9485239a232f
  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/e9dfa37740e6...17de3d7ad1f3

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.5/e9dfa3-17de3d%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.