git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 9bb842f) | patch
Avoid repeated table name lookups in createPartitionTable()
2024年8月22日 06:50:48 +0000 (09:50 +0300)
2024年8月22日 06:50:48 +0000 (09:50 +0300)
commit 04158e7fa37c2dda9c3421ca922d02807b86df19
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
src/backend/commands/tablecmds.c diff | blob | blame | history
src/backend/parser/gram.y diff | blob | blame | history
src/backend/tcop/utility.c diff | blob | blame | history
src/include/nodes/parsenodes.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /