Commit 439ff9b
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 6f8b6ab commit 439ff9b
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 | |
|---|---|---|---|
| |||
887 | 887 | | |
888 | 888 | | |
889 | 889 | | |
890 | | - | |
891 | 890 | | |
892 | 891 | | |
893 | 892 | | |
| |||
896 | 895 | | |
897 | 896 | | |
898 | 897 | | |
899 | | - | |
900 | 898 | | |
901 | 899 | | |
902 | 900 | | |
| |||
944 | 942 | | |
945 | 943 | | |
946 | 944 | | |
947 | | - | |
948 | 945 | | |
949 | 946 | | |
950 | 947 | | |
| |||
973 | 970 | | |
974 | 971 | | |
975 | 972 | | |
976 | | - | |
977 | 973 | | |
978 | 974 | | |
979 | 975 | | |
| |||
987 | 983 | | |
988 | 984 | | |
989 | 985 | | |
990 | | - | |
991 | 986 | | |
992 | 987 | | |
993 | 988 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
186 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
| 193 | + | |
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
195 | 197 | | |
196 | 198 | | |
197 | 199 | | |
198 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
199 | 205 | | |
200 | 206 | | |
201 | 207 | | |
202 | 208 | | |
203 | 209 | | |
204 | 210 | | |
205 | | - | |
206 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
207 | 217 | | |
208 | 218 | | |
209 | 219 | | |
210 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
211 | 224 | | |
212 | 225 | | |
213 | 226 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3464 | 3464 | | |
3465 | 3465 | | |
3466 | 3466 | | |
3467 | | - | |
| 3467 | + | |
| 3468 | + | |
| 3469 | + | |
| 3470 | + | |
| 3471 | + | |
| 3472 | + | |
| 3473 | + | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
3468 | 3477 | | |
3469 | 3478 | | |
3470 | 3479 | | |
| |||
0 commit comments