forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf535110
committed
Reject substituting extension schemas or owners matching ["$'\].
Substituting such values in extension scripts facilitated SQL injectionwhen @extowner@, @extschema@, or @extschema:...@ appeared inside aquoting construct (dollar quoting, '', or ""). No bundled extension wasvulnerable. Vulnerable uses do appear in a documentation example and innon-bundled extensions. Hence, the attack prerequisite was anadministrator having installed files of a vulnerable, trusted,non-bundled extension. Subject to that prerequisite, this enabled anattacker having database-level CREATE privilege to execute arbitrarycode as the bootstrap superuser. By blocking this attack in the coreserver, there's no need to modify individual extensions. Back-patch tov11 (all supported versions).Reported by Micah Gate, Valerie Woolard, Tim Carey-Smith, and ChristophBerg.Security:CVE-2023-394171 parente8386b2 commitf535110
File tree
7 files changed
+79
-15
lines changed- src
- backend/commands
- test/modules/test_extensions
- expected
- sql
7 files changed
+79
-15
lines changedLines changed: 27 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1001 | 1001 |
| |
1002 | 1002 |
| |
1003 | 1003 |
| |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
1004 | 1014 |
| |
1005 | 1015 |
| |
1006 | 1016 |
| |
| |||
1030 | 1040 |
| |
1031 | 1041 |
| |
1032 | 1042 |
| |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
1033 | 1048 |
| |
1034 | 1049 |
| |
1035 | 1050 |
| |
| |||
1041 | 1056 |
| |
1042 | 1057 |
| |
1043 | 1058 |
| |
| 1059 | + | |
1044 | 1060 |
| |
1045 | 1061 |
| |
1046 | 1062 |
| |
1047 | 1063 |
| |
1048 | 1064 |
| |
1049 | 1065 |
| |
1050 | 1066 |
| |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1051 | 1072 |
| |
1052 | 1073 |
| |
1053 | 1074 |
| |
| |||
1057 | 1078 |
| |
1058 | 1079 |
| |
1059 | 1080 |
| |
| 1081 | + | |
1060 | 1082 |
| |
1061 | 1083 |
| |
1062 | 1084 |
| |
| |||
1069 | 1091 |
| |
1070 | 1092 |
| |
1071 | 1093 |
| |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
1072 | 1099 |
| |
1073 | 1100 |
| |
1074 | 1101 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
| 9 | + | |
9 | 10 |
| |
10 | 11 |
| |
11 | 12 |
| |
| |||
15 | 16 |
| |
16 | 17 |
| |
17 | 18 |
| |
| 19 | + | |
18 | 20 |
| |
19 | 21 |
| |
20 | 22 |
| |
|
Lines changed: 24 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
1 | 2 |
| |
2 | 3 |
| |
3 | 4 |
| |
| |||
6 | 7 |
| |
7 | 8 |
| |
8 | 9 |
| |
9 |
| - | |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
20 |
| - | |
21 |
| - | |
22 |
| - | |
23 |
| - | |
24 |
| - | |
25 |
| - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
30 | 30 |
| |
31 |
| - | |
| 31 | + | |
32 | 32 |
| |
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 | 37 |
| |
| 38 | + | |
38 | 39 |
| |
39 | 40 |
| |
40 | 41 |
| |
| |||
312 | 313 |
| |
313 | 314 |
| |
314 | 315 |
| |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
315 | 323 |
| |
316 | 324 |
| |
317 | 325 |
| |
| |||
358 | 366 |
| |
359 | 367 |
| |
360 | 368 |
| |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
361 | 374 |
| |
362 | 375 |
| |
363 | 376 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
27 | 27 |
| |
28 | 28 |
| |
29 | 29 |
| |
| 30 | + | |
| 31 | + | |
30 | 32 |
| |
31 | 33 |
| |
32 | 34 |
| |
|
Lines changed: 16 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 |
| |
2 | 4 |
| |
3 | 5 |
| |
4 | 6 |
| |
5 |
| - | |
6 |
| - | |
| 7 | + | |
7 | 8 |
| |
8 | 9 |
| |
9 |
| - | |
| 10 | + | |
10 | 11 |
| |
11 | 12 |
| |
12 | 13 |
| |
13 | 14 |
| |
14 | 15 |
| |
15 |
| - | |
| 16 | + | |
| 17 | + | |
16 | 18 |
| |
17 | 19 |
| |
18 | 20 |
| |
| |||
210 | 212 |
| |
211 | 213 |
| |
212 | 214 |
| |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
213 | 222 |
| |
214 | 223 |
| |
215 | 224 |
| |
| |||
245 | 254 |
| |
246 | 255 |
| |
247 | 256 |
| |
| 257 | + | |
| 258 | + | |
| 259 | + | |
248 | 260 |
| |
249 | 261 |
| |
250 | 262 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + |
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + |
0 commit comments
Comments
(0)