From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix potential use-after-free for BEFORE UPDATE row triggers on n
Date: Fri, 19 Apr 2019 01:24:21 +0000
Message-ID: <E1hHIGL-0008Fl-87@gemulon.postgresql.org> (raw)
Fix potential use-after-free for BEFORE UPDATE row triggers on non-core AMs.
When such a trigger returns the old row version, it naturally get
stored in the slot for the trigger result. When a table AMs doesn't
store HeapTuples internally, ExecBRUpdateTriggers() frees the old row
version passed to triggers - but before this fix it might still be
referenced by the slot holding the new tuple.
Noticed when running the out-of-core zheap AM against the in-core
version of tableam.
Author: Andres Freund
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/75e03eabeaac8fd229b14f74de55d0e1470903c4
Modified Files
--------------
src/backend/commands/trigger.c | 9 +++++++++
1 file changed, 9 insertions(+)
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: andres@anarazel.de
Subject: Re: pgsql: Fix potential use-after-free for BEFORE UPDATE row triggers on n
In-Reply-To: <E1hHIGL-0008Fl-87@gemulon.postgresql.org>
References: <E1hHIGL-0008Fl-87@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