1. 15 Nov, 2020 5 commits
  2. 14 Nov, 2020 3 commits
  3. 13 Nov, 2020 2 commits
  4. 12 Nov, 2020 12 commits
  5. 11 Nov, 2020 9 commits
  6. 10 Nov, 2020 5 commits
  7. 09 Nov, 2020 4 commits
    • Tom Lane's avatar
      Doc: clarify data type behavior of COALESCE and NULLIF. · 24b83a50
      Tom Lane authored
      After studying the code, NULLIF is a lot more subtle than you might
      have guessed.
      
      Discussion: https://postgr.es/m/160486028730.25500.15740897403028593550@wrigleys.postgresql.org
      24b83a50
    • Peter Geoghegan's avatar
      Remove ineffective heapam CHECK_FOR_INTERRUPTS(). · 180cf876
      Peter Geoghegan authored
      Remove a CHECK_FOR_INTERRUPTS() call that could never actually handle an
      interrupt.  We always have a heap page buffer lock at this point.
      Having a useless CHECK_FOR_INTERRUPTS() call is harmless but misleading.
      
      It is probably possible to work around the immediate problem by moving
      the CHECK_FOR_INTERRUPTS() to before the heap page buffer lock is
      acquired.  That isn't enough to make the function responsive to
      interrupts, though.  The index AM caller will still hold an exclusive
      buffer lock of its own.
      180cf876
    • Noah Misch's avatar
      Ignore attempts to \gset into specially treated variables. · 098fb007
      Noah Misch authored
      If an interactive psql session used \gset when querying a compromised
      server, the attacker could execute arbitrary code as the operating
      system account running psql.  Using a prefix not found among specially
      treated variables, e.g. every lowercase string, precluded the attack.
      Fix by issuing a warning and setting no variable for the column in
      question.  Users wanting the old behavior can use a prefix and then a
      meta-command like "\set HISTSIZE :prefix_HISTSIZE".  Back-patch to 9.5
      (all supported versions).
      
      Reviewed by Robert Haas.  Reported by Nick Cleaton.
      
      Security: CVE-2020-25696
      098fb007
    • Noah Misch's avatar
      In security-restricted operations, block enqueue of at-commit user code. · 0c3185e9
      Noah Misch authored
      Specifically, this blocks DECLARE ... WITH HOLD and firing of deferred
      triggers within index expressions and materialized view queries.  An
      attacker having permission to create non-temp objects in at least one
      schema could execute arbitrary SQL functions under the identity of the
      bootstrap superuser.  One can work around the vulnerability by disabling
      autovacuum and not manually running ANALYZE, CLUSTER, REINDEX, CREATE
      INDEX, VACUUM FULL, or REFRESH MATERIALIZED VIEW.  (Don't restore from
      pg_dump, since it runs some of those commands.)  Plain VACUUM (without
      FULL) is safe, and all commands are fine when a trusted user owns the
      target object.  Performance may degrade quickly under this workaround,
      however.  Back-patch to 9.5 (all supported versions).
      
      Reviewed by Robert Haas.  Reported by Etienne Stalmans.
      
      Security: CVE-2020-25695
      0c3185e9