forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1f474d2
committed
Abandon the use of Perl's Safe.pm to enforce restrictions in plperl, as it is
fundamentally insecure. Instead apply an opmask to the whole interpreter thatimposes restrictions on unsafe operations. These restrictions are much harderto subvert than is Safe.pm, since there is no container to be broken out of.Backported to release 7.4.In releases 7.4, 8.0 and 8.1 this also includes the necessary backporting ofthe two interpreters model for plperl and plperlu adopted in release 8.2.In versions 8.0 and up, the use of Perl's POSIX module to undo its localemangling on Windows has become insecure with these changes, so it isreplaced by our own routine, which is also faster.Nice side effects of the changes include that it is now possible to use perl's"strict" pragma in a natural way in plperl, and that perl's $a and$b variables now work as expected in sort routines, and that functioncompilation is significantly faster.Tim Bunce and Andrew Dunstan, with reviews from Alex Hunsaker andAlexey Klyukin.Security:CVE-2010-11691 parent2b61b3e commit1f474d2
File tree
14 files changed
+400
-266
lines changed- doc/src/sgml
- src/pl/plperl
- expected
- sql
14 files changed
+400
-266
lines changedLines changed: 10 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
1154 | 1154 |
| |
1155 | 1155 |
| |
1156 | 1156 |
| |
1157 |
| - | |
| 1157 | + | |
1158 | 1158 |
| |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
1159 | 1167 |
| |
1160 | 1168 |
| |
1161 | 1169 |
| |
|
Lines changed: 8 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
39 |
| - | |
| 39 | + | |
40 | 40 |
| |
41 | 41 |
| |
42 | 42 |
| |
| |||
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
57 |
| - | |
| 57 | + | |
58 | 58 |
| |
59 |
| - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
60 | 63 |
| |
61 | 64 |
| |
62 | 65 |
| |
| |||
81 | 84 |
| |
82 | 85 |
| |
83 | 86 |
| |
84 |
| - | |
| 87 | + | |
85 | 88 |
| |
86 | 89 |
| |
87 | 90 |
| |
|
Lines changed: 17 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
563 | 563 |
| |
564 | 564 |
| |
565 | 565 |
| |
566 |
| - | |
567 |
| - | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
568 | 583 |
| |
569 | 584 |
| |
570 | 585 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
4 |
| - | |
| 4 | + | |
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 |
| - | |
| 8 | + | |
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
13 |
| - | |
| 12 | + | |
| 13 | + | |
14 | 14 |
|
Lines changed: 28 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
63 | 63 |
| |
64 | 64 |
| |
65 | 65 |
| |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + |
Lines changed: 5 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
36 |
| - | |
37 |
| - | |
38 |
| - | |
39 |
| - | |
| 36 | + | |
40 | 37 |
| |
41 | 38 |
| |
42 |
| - | |
43 |
| - | |
44 |
| - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
45 | 42 |
| |
46 | 43 |
| |
47 | 44 |
| |
|
Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 0 additions & 95 deletions
This file was deleted.
Lines changed: 29 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + |
0 commit comments
Comments
(0)