aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/constraint.c
diff options
context:
space:
mode:
authorAlexander Korotkov <akorotkov@postgresql.org>2024-08-22 09:50:48 +0300
committerAlexander Korotkov <akorotkov@postgresql.org>2024-08-22 09:52:54 +0300
commitf636ab41aba215eaa3303e21a10f12d81357f1f6 (patch)
tree0c281591ab46b9140c25f3cdd6f52b7a1612fd8e /src/backend/commands/constraint.c
parent2366ab246a32fa2f10523768926dcf6afe42080f (diff)
downloadpostgresql-f636ab41aba215eaa3303e21a10f12d81357f1f6.tar.gz
postgresql-f636ab41aba215eaa3303e21a10f12d81357f1f6.zip
Avoid repeated table name lookups in createPartitionTable()
Currently, createPartitionTable() opens newly created table using its name. This approach is prone to privilege escalation attack, because we might end up opening another table than we just created. This commit address the issue above by opening newly created table by its OID. It appears to be tricky to get a relation OID out of ProcessUtility(). We have to extend TableLikeClause with new newRelationOid field, which is filled within ProcessUtility() to be further accessed by caller. Security: CVE-2014-0062 Reported-by: Noah Misch Discussion: https://postgr.es/m/20240808171351.a9.nmisch%40google.com Reviewed-by: Pavel Borisov, Dmitry Koval
Diffstat (limited to 'src/backend/commands/constraint.c')
0 files changed, 0 insertions, 0 deletions