agora inbox for pgsql-committers@postgresql.org
help / color / mirror / Atom feedFrom: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: ecpg: Fix out-of-bound writes due to processing of invalid bytea
Date: Mon, 10 Aug 2026 13:41:27 +0000
Message-ID: <E1wtQFr-00000000yCl-2EDM@gemulon.postgresql.org> (raw)
ecpg: Fix out-of-bound writes due to processing of invalid bytea data
ECPG assumes that any bytea data it receives from a backend starts with
'\x' as its first two bytes, but a check was missed to enforce that. A
rogue server sending some garbage bytea data would be able to crash a
client, resulting in a client-side DoS, in the most common cases.
Reported-by: ylwangtju <ylwangtju@qq.com>
Backpatch-through: 14
Security: CVE-2026-16241
Branch
------
REL_17_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/c3c830272a97b9b429eb015c2df206264649c6fc
Author: Michael Paquier <michael@paquier.xyz>
Modified Files
--------------
src/interfaces/ecpg/ecpglib/data.c | 7 ++++++
src/interfaces/ecpg/ecpglib/error.c | 7 ++++++
src/interfaces/ecpg/include/ecpgerrno.h | 1 +
src/interfaces/ecpg/test/expected/sql-bytea.c | 27 ++++++++++++++++++----
src/interfaces/ecpg/test/expected/sql-bytea.stderr | 24 ++++++++++++++++++-
src/interfaces/ecpg/test/sql/bytea.pgc | 5 ++++
6 files changed, 66 insertions(+), 5 deletions(-)
view thread (5+ messages) latest in thread
Message-ID: <E1wtQFr-00000000yCl-2EDM@gemulon.postgresql.org>
Permalink: ../E1wtQFr-00000000yCl-2EDM@gemulon.postgresql.org/
Also on: postgresql.org/message-id/E1wtQFr-00000000yCl-2EDM@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: noah@leadboat.com, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: ecpg: Fix out-of-bound writes due to processing of invalid bytea
In-Reply-To: <E1wtQFr-00000000yCl-2EDM@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox