From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Prevent buffer overrun in read_tablespace_map().
Date: Wed, 17 Mar 2021 20:19:03 +0000
Message-ID: <E1lMcdD-0007vd-MH@gemulon.postgresql.org> (raw)
Prevent buffer overrun in read_tablespace_map().
Robert Foggia of Trustwave reported that read_tablespace_map()
fails to prevent an overrun of its on-stack input buffer.
Since the tablespace map file is presumed trustworthy, this does
not seem like an interesting security vulnerability, but still
we should fix it just in the name of robustness.
While here, document that pg_basebackup's --tablespace-mapping option
doesn't work with tar-format output, because it doesn't. To make it
work, we'd have to modify the tablespace_map file within the tarball
sent by the server, which might be possible but I'm not volunteering.
(Less-painful solutions would require changing the basebackup protocol
so that the source server could adjust the map. That's not very
appetizing either.)
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/b77e5d73bcfc0810e7a4eab29cfbc2859adb8db9
Modified Files
--------------
doc/src/sgml/ref/pg_basebackup.sgml | 8 +++++++-
src/backend/access/transam/xlog.c | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
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: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Prevent buffer overrun in read_tablespace_map().
In-Reply-To: <E1lMcdD-0007vd-MH@gemulon.postgresql.org>
References: <E1lMcdD-0007vd-MH@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