pgsql: Fix use-after-free with multirange types in CREATE TYPE

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix use-after-free with multirange types in CREATE TYPE
Date: 2021-10-13 07:38:40
Message-ID: E1maYqW-0008WJ-0N@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix use-after-free with multirange types in CREATE TYPE

The code was freeing the name of the multirange type function stored in
the parse tree but it should not do that. Event triggers could for
example look at such a corrupted parsed tree with a ddl_command_end
event.

Author: Alex Kozhemyakin, Sergey Shinderuk
Reviewed-by: Peter Eisentraut, Michael Paquier
Discussion: https://postgr.es/m/d5042d46-b9cd-6efb-219a-71ed0cf45bc8@postgrespro.ru
Backpatch-through: 14

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/922e15c47647af1b15af0a92742c8af69e83c823

Modified Files
--------------
src/backend/commands/typecmds.c | 1 -
1 file changed, 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Etsuro Fujita 2021-10-13 10:12:18 pgsql: postgres_fdw: Move comments about elog level in (sub)abort clean
Previous Message Michael Paquier 2021-10-13 07:38:39 pgsql: Fix use-after-free with multirange types in CREATE TYPE