diff options
author | Robert Haas <rhaas@postgresql.org> | 2014-02-17 09:33:31 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2014-02-17 09:33:32 -0500 |
commit | e1e0a4d791292ebe9572451a6cf49fb0ccb320c7 (patch) | |
tree | 1487eb31a138906ff2f30fa1d03be98188eb292a /src/include/nodes/parsenodes.h | |
parent | 30b1c40f98e5e4d0f3d8ec7673f3fbb8ae8ee43f (diff) | |
download | postgresql-e1e0a4d791292ebe9572451a6cf49fb0ccb320c7.tar.gz postgresql-e1e0a4d791292ebe9572451a6cf49fb0ccb320c7.zip |
Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed against a
different table than the index creation, allowing for a privilege
escalation attack.
This changes the calling convention for DefineIndex, CreateTrigger,
transformIndexStmt, transformAlterTableStmt, CheckIndexCompatible
(in 9.2 and newer), and AlterTable (in 9.1 and older). In addition,
CheckRelationOwnership is removed in 9.2 and newer and the calling
convention is changed in older branches. A field has also been added
to the Constraint node (FkConstraint in 8.4). Third-party code calling
these functions or using the Constraint node will require updating.
Report by Andres Freund. Patch by Robert Haas and Andres Freund,
reviewed by Tom Lane.
Security: CVE-2014-0062
Diffstat (limited to 'src/include/nodes/parsenodes.h')
-rw-r--r-- | src/include/nodes/parsenodes.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 92981616afd..02f9e5e435b 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -1583,6 +1583,8 @@ typedef struct Constraint /* Fields used for constraints that allow a NOT VALID specification */ bool skip_validation; /* skip validation of existing rows? */ bool initially_valid; /* mark the new constraint as valid? */ + + Oid old_pktable_oid; /* pg_constraint.confrelid of my former self */ } Constraint; /* ---------------------- |