pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Check for unbounded authentication exchanges in libpq.
Date: Wed, 22 Feb 2023 19:42:44 +0000
Message-ID: <E1pUv0m-000Bm9-GL@gemulon.postgresql.org> (raw)

Check for unbounded authentication exchanges in libpq.

A couple of code paths in CONNECTION_AWAITING_RESPONSE will eagerly read
bytes off a connection that should be closed. Don't let a misbehaving
server chew up client resources here; a v2 error can't be infinitely
long, and a v3 error should be bounded by its original message length.

For the existing error_return cases, I added some additional error
messages for symmetry with the new ones, and cleaned up some message
rot.

Author: Jacob Champion
Discussion: https://www.postgresql.org/message-id/8e729daf-7d71-6965-9687-8bc0630599b3%40timescale.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5e044471a1aa8714d4fc59ea0d599009aaa05278

Modified Files
--------------
src/interfaces/libpq/fe-connect.c | 51 ++++++++++++++++++++++++++++++---------
1 file changed, 39 insertions(+), 12 deletions(-)



Message-ID: <E1pUv0m-000Bm9-GL@gemulon.postgresql.org>
Permalink:  ../E1pUv0m-000Bm9-GL@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pUv0m-000Bm9-GL@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: heikki.linnakangas@iki.fi
  Subject: Re: pgsql: Check for unbounded authentication exchanges in libpq.
  In-Reply-To: <E1pUv0m-000Bm9-GL@gemulon.postgresql.org>
  References: <E1pUv0m-000Bm9-GL@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