- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitcd7f19d
committed
Fix potential pointer overflow in xlogreader.c.
While checking if a record could fit in the circular WAL decodingbuffer, the coding from commit3f1ce97 used arithmetic that couldoverflow. 64 bit systems were unaffected for various technical reasons,which probably explains the lack of problem reports. Likewise for 32bit systems running known 32 bit kernels. The systems at risk ofproblems appear to be 32 bit processes running on 64 bit kernels, withunlucky placement in memory.Per complaint from GCC -fsanitize=undefined -m32, while testingvariations of 039_end_of_wal.pl.Back-patch to 15.Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>Reviewed-by: Robert Haas <robertmhaas@gmail.com>Discussion:https://postgr.es/m/CA%2BhUKGKH0oRPOX7DhiQ_b51sM8HqcPp2J3WA-Oen%3DdXog%2BAGGQ%40mail.gmail.com1 parent2cc2d02 commitcd7f19d
1 file changed
+37
-9
lines changedLines changed: 37 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
457 | 457 |
| |
458 | 458 |
| |
459 | 459 |
| |
460 |
| - | |
461 |
| - | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
462 | 463 |
| |
463 |
| - | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
464 | 474 |
| |
465 | 475 |
| |
466 | 476 |
| |
467 | 477 |
| |
468 |
| - | |
469 |
| - | |
| 478 | + | |
| 479 | + | |
470 | 480 |
| |
471 |
| - | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
472 | 491 |
| |
473 | 492 |
| |
474 | 493 |
| |
| |||
477 | 496 |
| |
478 | 497 |
| |
479 | 498 |
| |
480 |
| - | |
481 |
| - | |
| 499 | + | |
| 500 | + | |
482 | 501 |
| |
483 |
| - | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
484 | 512 |
| |
485 | 513 |
| |
486 | 514 |
| |
|
0 commit comments
Comments
(0)