Commit 648e41a
committed
Prevent a double free by not reentering be_tls_close().
Reentering this function with the right timing caused a double free,
typically crashing the backend. By synchronizing a disconnection with
the authentication timeout, an unauthenticated attacker could achieve
this somewhat consistently. Call be_tls_close() solely from within
proc_exit_prepare(). Back-patch to 9.0 (all supported versions).
Benkocs Norbert Attila
Security: CVE-2015-31651 parent 69cb7b9 commit 648e41a
File tree
3 files changed
+28
-11
lines changed- src/backend
- libpq
- postmaster
3 files changed
+28
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
906 | 906 | | |
907 | 907 | | |
908 | 908 | | |
909 | | - | |
910 | 909 | | |
911 | 910 | | |
912 | 911 | | |
| |||
915 | 914 | | |
916 | 915 | | |
917 | 916 | | |
918 | | - | |
919 | 917 | | |
920 | 918 | | |
921 | 919 | | |
| |||
963 | 961 | | |
964 | 962 | | |
965 | 963 | | |
966 | | - | |
967 | 964 | | |
968 | 965 | | |
969 | 966 | | |
| |||
992 | 989 | | |
993 | 990 | | |
994 | 991 | | |
995 | | - | |
996 | 992 | | |
997 | 993 | | |
998 | 994 | | |
| |||
1006 | 1002 | | |
1007 | 1003 | | |
1008 | 1004 | | |
1009 | | - | |
1010 | 1005 | | |
1011 | 1006 | | |
1012 | 1007 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
174 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
| 181 | + | |
180 | 182 | | |
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
184 | 186 | | |
185 | 187 | | |
186 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
187 | 193 | | |
188 | 194 | | |
189 | 195 | | |
190 | 196 | | |
191 | 197 | | |
192 | 198 | | |
193 | | - | |
194 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
195 | 205 | | |
196 | 206 | | |
197 | 207 | | |
198 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
199 | 212 | | |
200 | 213 | | |
201 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3417 | 3417 | | |
3418 | 3418 | | |
3419 | 3419 | | |
3420 | | - | |
| 3420 | + | |
| 3421 | + | |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
3421 | 3430 | | |
3422 | 3431 | | |
3423 | 3432 | | |
| |||
0 commit comments