Commit b0ce385
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 8cc7a4c commit b0ce385
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 | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
356 | | - | |
357 | 356 | | |
358 | 357 | | |
359 | 358 | | |
| |||
362 | 361 | | |
363 | 362 | | |
364 | 363 | | |
365 | | - | |
366 | 364 | | |
367 | 365 | | |
368 | 366 | | |
| |||
419 | 417 | | |
420 | 418 | | |
421 | 419 | | |
422 | | - | |
423 | 420 | | |
424 | 421 | | |
425 | 422 | | |
| |||
449 | 446 | | |
450 | 447 | | |
451 | 448 | | |
452 | | - | |
453 | 449 | | |
454 | 450 | | |
455 | 451 | | |
| |||
463 | 459 | | |
464 | 460 | | |
465 | 461 | | |
466 | | - | |
467 | 462 | | |
468 | 463 | | |
469 | 464 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| 231 | + | |
230 | 232 | | |
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
234 | 236 | | |
235 | 237 | | |
236 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
237 | 243 | | |
238 | 244 | | |
239 | 245 | | |
240 | 246 | | |
241 | 247 | | |
242 | 248 | | |
243 | | - | |
244 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
245 | 255 | | |
246 | 256 | | |
247 | 257 | | |
248 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
249 | 262 | | |
250 | 263 | | |
251 | 264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3960 | 3960 | | |
3961 | 3961 | | |
3962 | 3962 | | |
3963 | | - | |
| 3963 | + | |
| 3964 | + | |
| 3965 | + | |
| 3966 | + | |
| 3967 | + | |
| 3968 | + | |
| 3969 | + | |
| 3970 | + | |
| 3971 | + | |
| 3972 | + | |
3964 | 3973 | | |
3965 | 3974 | | |
3966 | 3975 | | |
| |||
0 commit comments