forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita034418
committed
Fix choice of comparison operators for cross-type hashed subplans.
Commitbf6c614 rearranged the lookup of the comparison operatorsneeded in a hashed subplan, and in so doing, broke the cross-typecase: it caused the original LHS-vs-RHS operator to be used to comparehash table entries too (which of course are all of the RHS type).This leads to C functions being passed a Datum that is not of thetype they expect, with the usual hazards of crashes and unauthorizedserver memory disclosure.For the set of hashable cross-type operators present in v11 corePostgres, this bug is nearly harmless on 64-bit machines, whichmay explain why it escaped earlier detection. But it is a livesecurity hazard on 32-bit machines; and of course there may beextensions that add more hashable cross-type operators, whichwould increase the risk.Reported by Andreas Seltenreich. Back-patch to v11 where theproblem came in.Security:CVE-2019-102091 parent21f94c5 commita034418
File tree
3 files changed
+44
-5
lines changed- src
- backend/executor
- test/regress
- expected
- sql
3 files changed
+44
-5
lines changedLines changed: 10 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
855 | 855 |
| |
856 | 856 |
| |
857 | 857 |
| |
| 858 | + | |
858 | 859 |
| |
859 | 860 |
| |
860 | 861 |
| |
| |||
917 | 918 |
| |
918 | 919 |
| |
919 | 920 |
| |
| 921 | + | |
| 922 | + | |
| 923 | + | |
920 | 924 |
| |
921 | 925 |
| |
922 | 926 |
| |
| |||
946 | 950 |
| |
947 | 951 |
| |
948 | 952 |
| |
949 |
| - | |
| 953 | + | |
950 | 954 |
| |
951 | 955 |
| |
952 | 956 |
| |
| |||
955 | 959 |
| |
956 | 960 |
| |
957 | 961 |
| |
958 |
| - | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
959 | 965 |
| |
960 | 966 |
| |
961 | 967 |
| |
| |||
994 | 1000 |
| |
995 | 1001 |
| |
996 | 1002 |
| |
997 |
| - | |
| 1003 | + | |
998 | 1004 |
| |
999 | 1005 |
| |
1000 | 1006 |
| |
1001 | 1007 |
| |
1002 |
| - | |
| 1008 | + | |
1003 | 1009 |
| |
1004 |
| - | |
1005 | 1010 |
| |
1006 | 1011 |
| |
1007 | 1012 |
| |
|
Lines changed: 24 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
745 | 745 |
| |
746 | 746 |
| |
747 | 747 |
| |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
748 | 772 |
| |
749 | 773 |
| |
750 | 774 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
435 | 435 |
| |
436 | 436 |
| |
437 | 437 |
| |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
438 | 448 |
| |
439 | 449 |
| |
440 | 450 |
| |
|
0 commit comments
Comments
(0)