pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use BIO_{get,set}_app_data instead of BIO_{get,set}_data.
Date: Tue, 28 Nov 2023 17:34:18 +0000
Message-ID: <E1r81yU-007giB-6Y@gemulon.postgresql.org> (raw)

Use BIO_{get,set}_app_data instead of BIO_{get,set}_data.

We should have done it this way all along, but we accidentally got
away with using the wrong BIO field up until OpenSSL 3.2.  There,
the library's BIO routines that we rely on use the "data" field
for their own purposes, and our conflicting use causes assorted
weird behaviors up to and including core dumps when SSL connections
are attempted.  Switch to using the approved field for the purpose,
i.e. app_data.

While at it, remove our configure probes for BIO_get_data as well
as the fallback implementation.  BIO_{get,set}_app_data have been
there since long before any OpenSSL version that we still support,
even in the back branches.

Also, update src/test/ssl/t/001_ssltests.pl to allow for a minor
change in an error message spelling that evidently came in with 3.2.

Tristan Partin and Bo Andreson.  Back-patch to all supported branches.

Discussion: https://postgr.es/m/CAN55FZ1eDDYsYaL7mv+oSLUij2h_u6hvD4Qmv-7PK7jkji0uyQ@mail.gmail.com

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0bd682246a619fd8eb9b538f1af61afb991b06b4

Modified Files
--------------
configure                                |  2 +-
configure.in                             |  2 +-
src/backend/libpq/be-secure-openssl.c    | 11 +++--------
src/include/pg_config.h.in               |  3 ---
src/include/pg_config.h.win32            |  3 ---
src/interfaces/libpq/fe-secure-openssl.c | 11 +++--------
src/tools/msvc/Solution.pm               |  1 -
7 files changed, 8 insertions(+), 25 deletions(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1r81yU-007giB-6Y@gemulon.postgresql.org>
Permalink:  ../E1r81yU-007giB-6Y@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1r81yU-007giB-6Y@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Use BIO_{get,set}_app_data instead of BIO_{get,set}_data.
  In-Reply-To: <E1r81yU-007giB-6Y@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox