Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

subselect.sql

  • Tom Lane's avatar
    a034418c
    Fix choice of comparison operators for cross-type hashed subplans. · a034418c
    Tom Lane authored
    Commit bf6c614a rearranged the lookup of the comparison operators
    needed in a hashed subplan, and in so doing, broke the cross-type
    case: it caused the original LHS-vs-RHS operator to be used to compare
    hash 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 the
    type they expect, with the usual hazards of crashes and unauthorized
    server memory disclosure.
    
    For the set of hashable cross-type operators present in v11 core
    Postgres, this bug is nearly harmless on 64-bit machines, which
    may explain why it escaped earlier detection.  But it is a live
    security hazard on 32-bit machines; and of course there may be
    extensions that add more hashable cross-type operators, which
    would increase the risk.
    
    Reported by Andreas Seltenreich.  Back-patch to v11 where the
    problem came in.
    
    Security: CVE-2019-10209
    a034418c
    History
    Fix choice of comparison operators for cross-type hashed subplans.
    Tom Lane authored
    Commit bf6c614a rearranged the lookup of the comparison operators
    needed in a hashed subplan, and in so doing, broke the cross-type
    case: it caused the original LHS-vs-RHS operator to be used to compare
    hash 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 the
    type they expect, with the usual hazards of crashes and unauthorized
    server memory disclosure.
    
    For the set of hashable cross-type operators present in v11 core
    Postgres, this bug is nearly harmless on 64-bit machines, which
    may explain why it escaped earlier detection.  But it is a live
    security hazard on 32-bit machines; and of course there may be
    extensions that add more hashable cross-type operators, which
    would increase the risk.
    
    Reported by Andreas Seltenreich.  Back-patch to v11 where the
    problem came in.
    
    Security: CVE-2019-10209