From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Fix RelationBuildPartitionKey's processing of partition key expr
Date: Mon, 05 Feb 2018 15:37:45 +0000
Message-ID: <E1eiiq1-00061J-2c@gemulon.postgresql.org> (raw)
Fix RelationBuildPartitionKey's processing of partition key expressions.
Failure to advance the list pointer while reading partition expressions
from a list results in invoking an input function with inappropriate data,
possibly leading to crashes or, with carefully crafted input, disclosure
of arbitrary backend memory.
Bug discovered independently by Álvaro Herrera and David Rowley.
This patch is by Álvaro but owes something to David's proposed fix.
Back-patch to v10 where the issue was introduced.
Security: CVE-2018-1052
Branch
------
REL_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/fe921a360a4858f537c99d1872d3c3a5a09d6df0
Modified Files
--------------
src/backend/utils/cache/relcache.c | 5 +++++
src/test/regress/expected/create_table.out | 31 ++++++++++++++++++++++--------
src/test/regress/sql/create_table.sql | 11 ++++++++---
3 files changed, 36 insertions(+), 11 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: Fix RelationBuildPartitionKey's processing of partition key expr
In-Reply-To: <E1eiiq1-00061J-2c@gemulon.postgresql.org>
References: <E1eiiq1-00061J-2c@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