forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork0
Commit91f3ffc
committed
Empty search_path in Autovacuum and non-psql/pgbench clients.
This makes the client programs behave as documented regardless of theconnect-time search_path and regardless of user-created objects. Today,a malicious user with CREATE permission on a search_path schema can takecontrol of certain of these clients' queries and invoke arbitrary SQLfunctions under the client identity, often a superuser. This isexploitable in the default configuration, where all users have CREATEprivilege on schema "public".This changes behavior of user-defined code stored in the database, likepg_index.indexprs and pg_extension_config_dump(). If they reach codebearing unqualified names, "does not exist" or "no schema has beenselected to create in" errors might appear. Users may fix such errorsby schema-qualifying affected names. After upgrading, consider watchingserver logs for these errors.The --table arguments of src/bin/scripts clients have been lax; forexample, "vacuumdb -Zt pg_am\;CHECKPOINT" performed a checkpoint. Thatnow fails, but for now, "vacuumdb -Zt 'pg_am(amname);CHECKPOINT'" stillperforms a checkpoint.Back-patch to 9.3 (all supported versions).Reviewed by Tom Lane, though this fix strategy was not his first choice.Reported by Arseniy Sharoglazov.Security:CVE-2018-10581 parenta8fc37a commit91f3ffc
File tree
28 files changed
+360
-89
lines changed- contrib
- oid2name
- vacuumlo
- src
- backend/postmaster
- bin
- pg_basebackup
- pg_dump
- pg_rewind
- pg_upgrade
- scripts
- t
- include
- fe_utils
- tools/findoidjoins
28 files changed
+360
-89
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
263 | 264 | | |
264 | 265 | | |
265 | 266 | | |
| 267 | + | |
266 | 268 | | |
267 | 269 | | |
268 | 270 | | |
| |||
322 | 324 | | |
323 | 325 | | |
324 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
325 | 338 | | |
326 | 339 | | |
327 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 139 | + | |
| 140 | + | |
143 | 141 | | |
144 | 142 | | |
145 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
530 | 530 | | |
531 | 531 | | |
532 | 532 | | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
533 | 539 | | |
534 | 540 | | |
535 | 541 | | |
| |||
1543 | 1549 | | |
1544 | 1550 | | |
1545 | 1551 | | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
1546 | 1560 | | |
1547 | 1561 | | |
1548 | 1562 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
208 | 209 | | |
209 | 210 | | |
210 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
211 | 229 | | |
212 | 230 | | |
213 | 231 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1376 | 1376 | | |
1377 | 1377 | | |
1378 | 1378 | | |
1379 | | - | |
1380 | | - | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
1381 | 1382 | | |
1382 | 1383 | | |
1383 | 1384 | | |
| |||
1390 | 1391 | | |
1391 | 1392 | | |
1392 | 1393 | | |
1393 | | - | |
| 1394 | + | |
| 1395 | + | |
1394 | 1396 | | |
1395 | | - | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
1396 | 1400 | | |
1397 | 1401 | | |
1398 | 1402 | | |
1399 | 1403 | | |
1400 | 1404 | | |
1401 | | - | |
| 1405 | + | |
1402 | 1406 | | |
1403 | 1407 | | |
1404 | 1408 | | |
| |||
1414 | 1418 | | |
1415 | 1419 | | |
1416 | 1420 | | |
1417 | | - | |
| 1421 | + | |
1418 | 1422 | | |
1419 | 1423 | | |
1420 | 1424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
116 | 122 | | |
117 | 123 | | |
118 | 124 | | |
| |||
321 | 327 | | |
322 | 328 | | |
323 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
324 | 335 | | |
325 | 336 | | |
326 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
965 | 966 | | |
966 | 967 | | |
967 | 968 | | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
968 | 972 | | |
969 | 973 | | |
970 | 974 | | |
| |||
1257 | 1261 | | |
1258 | 1262 | | |
1259 | 1263 | | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
1260 | 1269 | | |
1261 | 1270 | | |
1262 | 1271 | | |
1263 | 1272 | | |
1264 | 1273 | | |
1265 | | - | |
1266 | | - | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
1267 | 1278 | | |
1268 | 1279 | | |
1269 | 1280 | | |
1270 | 1281 | | |
1271 | 1282 | | |
1272 | 1283 | | |
1273 | 1284 | | |
| 1285 | + | |
1274 | 1286 | | |
| 1287 | + | |
1275 | 1288 | | |
1276 | 1289 | | |
1277 | 1290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
1983 | 1984 | | |
1984 | 1985 | | |
1985 | 1986 | | |
1986 | | - | |
1987 | | - | |
1988 | | - | |
1989 | | - | |
1990 | 1987 | | |
1991 | | - | |
| 1988 | + | |
1992 | 1989 | | |
1993 | 1990 | | |
1994 | 1991 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| 43 | + | |
| 44 | + | |
42 | 45 | | |
43 | 46 | | |
44 | 47 | | |
| |||
0 commit comments
Comments
(0)