pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix pgoutput crash on missing option values
Date: Sun, 01 Nov 2026 23:14:19 +0000
Message-ID: <E1xNekl-00000001iVx-43bC@gemulon.postgresql.org> (raw)

Fix pgoutput crash on missing option values

The replication protocol allows options without values, but pgoutput
dereferenced a NULL DefElem argument for parameters proto_version and
publication_names.  A replication client was able to crash a WAL sender.

This issue is fixed by reading both options with defGetString(), which
is able to report a missing parameter cleanly.

Reported-by: Brar Piening <brar@gmx.de>
Author: Zhijie Hou <houzhijie22@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Discussion: https://postgr.es/m/19795-6d7d506133b7f062@postgresql.org
Backpatch-through: 14

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c3ef3f2283d6a9b8d63ba35c5bc5ad4f1864682d

Modified Files
--------------
src/backend/replication/pgoutput/pgoutput.c   | 10 ++++----
src/bin/pg_basebackup/t/030_pg_recvlogical.pl | 35 +++++++++++++++++++++++++++
2 files changed, 40 insertions(+), 5 deletions(-)



Message-ID: <E1xNekl-00000001iVx-43bC@gemulon.postgresql.org>
Permalink:  ../E1xNekl-00000001iVx-43bC@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1xNekl-00000001iVx-43bC@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: michael@paquier.xyz
  Subject: Re: pgsql: Fix pgoutput crash on missing option values
  In-Reply-To: <E1xNekl-00000001iVx-43bC@gemulon.postgresql.org>
  References: <E1xNekl-00000001iVx-43bC@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