From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Check for unbounded authentication exchanges in libpq. |
Date: | 2023-02-22 19:42:44 |
Message-ID: | E1pUv0m-000Bm9-GL@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2023-02-22 22:47:05 | pgsql: Add static assertion ensuring sizeof(ExprEvalStep) <= 64 bytes |
Previous Message | Tom Lane | 2023-02-22 17:39:22 | pgsql: Fix some issues with wrong placement of pseudo-constant quals. |