forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit09ec55b
committed
Fix buffer overflow when parsing SCRAM verifiers in backend
Any authenticated user can overflow a stack-based buffer by changing theuser's own password to a purpose-crafted value. This often suffices toexecute arbitrary code as the PostgreSQL operating system account.This fix is contributed by multiple folks, based on an initial analysisfrom Tom Lane. This issue has been introduced by 68e61ee, so it waspossible to make use of it at authentication time. It became moreeasily to trigger after ccae190 which has made the SCRAM parsing morestrict when changing a password, in the case where the client passesdown a verifier already hashed using SCRAM. Back-patch to v10 whereSCRAM has been introduced.Reported-by: Alexander LakhinAuthor: Jonathan Katz, Heikki Linnakangas, Michael PaquierSecurity:CVE-2019-10164Backpatch-through: 101 parent3412030 commit09ec55b
File tree
3 files changed
+68
-8
lines changed- src
- backend/libpq
- test/regress
- expected
- sql
3 files changed
+68
-8
lines changedLines changed: 27 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
542 | 542 |
| |
543 | 543 |
| |
544 | 544 |
| |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
545 | 551 |
| |
546 | 552 |
| |
547 | 553 |
| |
| |||
557 | 563 |
| |
558 | 564 |
| |
559 | 565 |
| |
| 566 | + | |
| 567 | + | |
560 | 568 |
| |
561 | 569 |
| |
562 | 570 |
| |
| |||
589 | 597 |
| |
590 | 598 |
| |
591 | 599 |
| |
592 |
| - | |
| 600 | + | |
| 601 | + | |
593 | 602 |
| |
594 | 603 |
| |
595 | 604 |
| |
596 | 605 |
| |
597 | 606 |
| |
598 | 607 |
| |
599 | 608 |
| |
600 |
| - | |
601 |
| - | |
| 609 | + | |
602 | 610 |
| |
603 |
| - | |
| 611 | + | |
604 | 612 |
| |
605 | 613 |
| |
| 614 | + | |
606 | 615 |
| |
607 |
| - | |
608 |
| - | |
| 616 | + | |
609 | 617 |
| |
610 |
| - | |
| 618 | + | |
611 | 619 |
| |
612 | 620 |
| |
| 621 | + | |
613 | 622 |
| |
614 | 623 |
| |
615 | 624 |
| |
616 | 625 |
| |
617 |
| - | |
618 | 626 |
| |
619 | 627 |
| |
620 | 628 |
| |
621 | 629 |
| |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
622 | 641 |
| |
623 | 642 |
| |
624 | 643 |
| |
|
Lines changed: 23 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
100 | 100 |
| |
101 | 101 |
| |
102 | 102 |
| |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
103 | 123 |
| |
104 | 124 |
| |
105 | 125 |
| |
| |||
109 | 129 |
| |
110 | 130 |
| |
111 | 131 |
| |
| 132 | + | |
| 133 | + | |
| 134 | + | |
112 | 135 |
| |
113 | 136 |
| |
114 | 137 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
75 | 75 |
| |
76 | 76 |
| |
77 | 77 |
| |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
78 | 93 |
| |
79 | 94 |
| |
80 | 95 |
| |
| |||
84 | 99 |
| |
85 | 100 |
| |
86 | 101 |
| |
| 102 | + | |
| 103 | + | |
| 104 | + | |
87 | 105 |
| |
88 | 106 |
| |
89 | 107 |
| |
|
0 commit comments
Comments
(0)