forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitac8f624
committed
In security-restricted operations, block enqueue of at-commit user code.
Specifically, this blocks DECLARE ... WITH HOLD and firing of deferredtriggers within index expressions and materialized view queries. Anattacker having permission to create non-temp objects in at least oneschema could execute arbitrary SQL functions under the identity of thebootstrap superuser. One can work around the vulnerability by disablingautovacuum and not manually running ANALYZE, CLUSTER, REINDEX, CREATEINDEX, VACUUM FULL, or REFRESH MATERIALIZED VIEW. (Don't restore frompg_dump, since it runs some of those commands.) Plain VACUUM (withoutFULL) is safe, and all commands are fine when a trusted user owns thetarget object. Performance may degrade quickly under this workaround,however. Back-patch to 9.5 (all supported versions).Reviewed by Robert Haas. Reported by Etienne Stalmans.Security:CVE-2020-256951 parenta98b461 commitac8f624
File tree
6 files changed
+104
-6
lines changed- contrib/postgres_fdw
- src
- backend
- access/transam
- commands
- test/regress
- expected
- sql
6 files changed
+104
-6
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
646 | 646 |
| |
647 | 647 |
| |
648 | 648 |
| |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
649 | 653 |
| |
650 | 654 |
| |
651 | 655 |
| |
|
Lines changed: 7 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2065 | 2065 |
| |
2066 | 2066 |
| |
2067 | 2067 |
| |
2068 |
| - | |
2069 |
| - | |
2070 |
| - | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
2071 | 2072 |
| |
2072 | 2073 |
| |
2073 | 2074 |
| |
| |||
2085 | 2086 |
| |
2086 | 2087 |
| |
2087 | 2088 |
| |
2088 |
| - | |
2089 |
| - | |
2090 |
| - | |
2091 | 2089 |
| |
2092 | 2090 |
| |
2093 | 2091 |
| |
2094 | 2092 |
| |
2095 | 2093 |
| |
2096 | 2094 |
| |
2097 | 2095 |
| |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
2098 | 2099 |
| |
2099 | 2100 |
| |
2100 | 2101 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
| 30 | + | |
30 | 31 |
| |
31 | 32 |
| |
32 | 33 |
| |
| |||
64 | 65 |
| |
65 | 66 |
| |
66 | 67 |
| |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
67 | 72 |
| |
68 | 73 |
| |
69 | 74 |
| |
|
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4383 | 4383 |
| |
4384 | 4384 |
| |
4385 | 4385 |
| |
| 4386 | + | |
4386 | 4387 |
| |
4387 | 4388 |
| |
4388 | 4389 |
| |
| |||
4418 | 4419 |
| |
4419 | 4420 |
| |
4420 | 4421 |
| |
| 4422 | + | |
4421 | 4423 |
| |
4422 | 4424 |
| |
4423 | 4425 |
| |
4424 | 4426 |
| |
4425 | 4427 |
| |
4426 | 4428 |
| |
4427 | 4429 |
| |
| 4430 | + | |
| 4431 | + | |
| 4432 | + | |
| 4433 | + | |
| 4434 | + | |
| 4435 | + | |
| 4436 | + | |
| 4437 | + | |
| 4438 | + | |
| 4439 | + | |
4428 | 4440 |
| |
4429 | 4441 |
| |
4430 | 4442 |
| |
|
Lines changed: 42 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1287 | 1287 |
| |
1288 | 1288 |
| |
1289 | 1289 |
| |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
1290 | 1332 |
| |
1291 | 1333 |
| |
1292 | 1334 |
| |
|
Lines changed: 34 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
778 | 778 |
| |
779 | 779 |
| |
780 | 780 |
| |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
781 | 815 |
| |
782 | 816 |
| |
783 | 817 |
| |
|
0 commit comments
Comments
(0)