pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Aleksander Alekseev <aleksander@timescale.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Willi Mann <w.mann@celonis.de>
Subject: Re: [PATCH] fix race condition in libpq (related to ssl connections)
Date: Mon, 27 Nov 2023 12:03:45 +0900
Message-ID: <ZWQHEdF1_NOI4jOS@paquier.xyz> (raw)
In-Reply-To: <ZWBVapzofU5P0IoW@paquier.xyz>
References: <e77abc4c-4d03-4058-a9d7-ef0035657e04@celonis.com>
	<CAJ7c6TN5KxKhCkHc=MJV=K3v9q98Pmfs=ZQ6pwTKMzRnikJfCQ@mail.gmail.com>
	<ZV1cxFxcvPDDJkpi@paquier.xyz>
	<ZWBVapzofU5P0IoW@paquier.xyz>

On Fri, Nov 24, 2023 at 04:48:58PM +0900, Michael Paquier wrote:
> I've looked at this idea, and finished by being unhappy with the error
> handling that we are currently assuming in my_SSL_set_fd() in the
> event of an error in the bio method setup, which would be most likely
> an OOM, so let's use ssl_config_mutex in my_BIO_s_socket().  Another
> thing is that I have minimized the manipulation of my_bio_methods in
> the setup routine.

I've spent more time on that today, and the patch I've posted on
Friday had a small mistake in the non-HAVE_BIO_METH_NEW path when
saving the BIO_METHODs causing the SSL tests to fail with older
OpenSSL versions.  I've fixed that and the patch was straight-forward,
so applied it down to v12.  I didn't use Willi's patch at the end,
still credited him as author as his original patch is rather close to
the result committed and it feels that he has spent a good deal of
time on this issue.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (8+ messages)

Message-ID: <ZWQHEdF1_NOI4jOS@paquier.xyz>
Permalink:  ../ZWQHEdF1_NOI4jOS@paquier.xyz/
Also on:    postgresql.org/message-id/ZWQHEdF1_NOI4jOS@paquier.xyz

 · 

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-hackers@postgresql.org
  Cc: michael@paquier.xyz, aleksander@timescale.com, pgsql-hackers@lists.postgresql.org, w.mann@celonis.de
  Subject: Re: [PATCH] fix race condition in libpq (related to ssl connections)
  In-Reply-To: <ZWQHEdF1_NOI4jOS@paquier.xyz>

* 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