forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit31c6e54
committed
Secure Unix-domain sockets of "make check" temporary clusters.
Any OS user able to access the socket can connect as the bootstrapsuperuser and in turn execute arbitrary code as the OS user running thetest. Protect against that by placing the socket in the temporary datadirectory, which has mode 0700 thanks to initdb. Back-patch to 8.4 (allsupported versions). The hazard remains wherever the temporary clusteraccepts TCP connections, notably on Windows.Attempts to run "make check" from a directory with a long name will nowfail. An alternative not sharing that problem was to place the socketin a subdirectory of /tmp, but that is only secure if /tmp is sticky.The PG_REGRESS_SOCK_DIR environment variable is available as aworkaround when testing from long directory paths.As a convenient side effect, this lets testing proceed smoothly inbuilds that override DEFAULT_PGSOCKET_DIR. Popular non-default valueslike /var/run/postgresql are often unwritable to the build user.Security:CVE-2014-00671 parentfbd32b0 commit31c6e54
File tree
3 files changed
+48
-26
lines changed- contrib/pg_upgrade
- doc/src/sgml
- src/test/regress
3 files changed
+48
-26
lines changedLines changed: 5 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
25 | 25 |
| |
26 | 26 |
| |
27 | 27 |
| |
28 |
| - | |
29 |
| - | |
30 | 28 |
| |
31 | 29 |
| |
32 | 30 |
| |
| |||
86 | 84 |
| |
87 | 85 |
| |
88 | 86 |
| |
89 |
| - | |
90 | 87 |
| |
91 | 88 |
| |
92 |
| - | |
| 89 | + | |
93 | 90 |
| |
94 | 91 |
| |
95 | 92 |
| |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
96 | 97 |
| |
97 | 98 |
| |
98 | 99 |
| |
|
Lines changed: 19 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
61 |
| - | |
62 |
| - | |
63 |
| - | |
64 |
| - | |
65 |
| - | |
66 |
| - | |
67 |
| - | |
68 |
| - | |
69 |
| - | |
70 |
| - | |
71 |
| - | |
72 |
| - | |
73 |
| - | |
74 |
| - | |
75 |
| - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
76 | 69 |
| |
77 | 70 |
| |
78 | 71 |
| |
| |||
111 | 104 |
| |
112 | 105 |
| |
113 | 106 |
| |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
114 | 118 |
| |
115 | 119 |
| |
116 | 120 |
| |
|
Lines changed: 24 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
109 | 109 |
| |
110 | 110 |
| |
111 | 111 |
| |
| 112 | + | |
112 | 113 |
| |
113 | 114 |
| |
114 | 115 |
| |
| |||
758 | 759 |
| |
759 | 760 |
| |
760 | 761 |
| |
761 |
| - | |
762 |
| - | |
| 762 | + | |
763 | 763 |
| |
764 | 764 |
| |
765 | 765 |
| |
| |||
771 | 771 |
| |
772 | 772 |
| |
773 | 773 |
| |
774 |
| - | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
775 | 791 |
| |
776 | 792 |
| |
777 | 793 |
| |
| |||
2265 | 2281 |
| |
2266 | 2282 |
| |
2267 | 2283 |
| |
2268 |
| - | |
2269 |
| - | |
2270 |
| - | |
2271 |
| - | |
| 2284 | + | |
| 2285 | + | |
| 2286 | + | |
| 2287 | + | |
| 2288 | + | |
2272 | 2289 |
| |
2273 | 2290 |
| |
2274 | 2291 |
| |
|
0 commit comments
Comments
(0)