- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit04158e7
committed
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 endup opening another table than we just created.This commit address the issue above by opening newly created table by itsOID. It appears to be tricky to get a relation OID out of ProcessUtility().We have to extend TableLikeClause with new newRelationOid field, which isfilled within ProcessUtility() to be further accessed by caller.Security:CVE-2014-0062Reported-by: Noah MischDiscussion:https://postgr.es/m/20240808171351.a9.nmisch%40google.comReviewed-by: Pavel Borisov, Dmitry Koval1 parent9bb842f commit04158e7
File tree
4 files changed
+10
-1
lines changed- src
- backend
- commands
- parser
- tcop
- include/nodes
4 files changed
+10
-1
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
20383 | 20383 |
| |
20384 | 20384 |
| |
20385 | 20385 |
| |
| 20386 | + | |
20386 | 20387 |
| |
20387 | 20388 |
| |
20388 | 20389 |
| |
| |||
20406 | 20407 |
| |
20407 | 20408 |
| |
20408 | 20409 |
| |
20409 |
| - | |
| 20410 | + | |
20410 | 20411 |
| |
20411 | 20412 |
| |
20412 | 20413 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4138 | 4138 |
| |
4139 | 4139 |
| |
4140 | 4140 |
| |
| 4141 | + | |
4141 | 4142 |
| |
4142 | 4143 |
| |
4143 | 4144 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1225 | 1225 |
| |
1226 | 1226 |
| |
1227 | 1227 |
| |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
1228 | 1234 |
| |
1229 | 1235 |
| |
1230 | 1236 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
754 | 754 |
| |
755 | 755 |
| |
756 | 756 |
| |
| 757 | + | |
757 | 758 |
| |
758 | 759 |
| |
759 | 760 |
| |
|
0 commit comments
Comments
(0)