1. 06 Nov, 2017 4 commits
    • Tom Lane's avatar
      Add tests for json{b}_populate_recordset() crash case. · b5742287
      Tom Lane authored
      The problem reported as CVE-2017-15098 was already resolved in HEAD by
      commit 37a795a6, but let's add the relevant test cases anyway.
      
      Michael Paquier and Tom Lane, per a report from David Rowley.
      
      Security: CVE-2017-15098
      b5742287
    • Noah Misch's avatar
      start-scripts: switch to $PGUSER before opening $PGLOG. · dfc015dc
      Noah Misch authored
      By default, $PGUSER has permission to unlink $PGLOG.  If $PGUSER
      replaces $PGLOG with a symbolic link, the server will corrupt the
      link-targeted file by appending log messages.  Since these scripts open
      $PGLOG as root, the attack works regardless of target file ownership.
      
      "make install" does not install these scripts anywhere.  Users having
      manually installed them in the past should repeat that process to
      acquire this fix.  Most script users have $PGLOG writable to root only,
      located in $PGDATA.  Just before updating one of these scripts, such
      users should rename $PGLOG to $PGLOG.old.  The script will then recreate
      $PGLOG with proper ownership.
      
      Reviewed by Peter Eisentraut.  Reported by Antoine Scemama.
      
      Security: CVE-2017-12172
      dfc015dc
    • Dean Rasheed's avatar
      Always require SELECT permission for ON CONFLICT DO UPDATE. · 87b2ebd3
      Dean Rasheed authored
      The update path of an INSERT ... ON CONFLICT DO UPDATE requires SELECT
      permission on the columns of the arbiter index, but it failed to check
      for that in the case of an arbiter specified by constraint name.
      
      In addition, for a table with row level security enabled, it failed to
      check updated rows against the table's SELECT policies when the update
      path was taken (regardless of how the arbiter index was specified).
      
      Backpatch to 9.5 where ON CONFLICT DO UPDATE and RLS were introduced.
      
      Security: CVE-2017-15099
      87b2ebd3
    • Noah Misch's avatar
      Add a temp-install prerequisite to "check"-like targets not having one. · c66b438d
      Noah Misch authored
      Makefile.global assigns this prerequisite to every target named "check",
      but similar targets must mention it explicitly.  Affected targets
      failed, tested $PATH binaries, or tested a stale temporary installation.
      The src/test/modules examples worked properly when called as "make -C
      src/test/modules/$FOO check", but "make -j" allowed the test to start
      before the temporary installation was in place.  Back-patch to 9.5,
      where commit dcae5fac introduced the
      shared temp-install.
      c66b438d
  2. 05 Nov, 2017 3 commits
  3. 04 Nov, 2017 5 commits
  4. 03 Nov, 2017 7 commits
  5. 02 Nov, 2017 13 commits
  6. 01 Nov, 2017 6 commits
  7. 31 Oct, 2017 2 commits
    • Stephen Frost's avatar
      Remove inbound links to sql-createuser · 0fe2780d
      Stephen Frost authored
      CREATE USER is an alias for CREATE ROLE, not its own command any longer,
      so clean up references to the 'sql-createuser' link to go to
      'sql-createrole' instead.
      
      In passing, change a few cases of 'CREATE USER' to be
      'CREATE ROLE ...  LOGIN'.  The remaining cases appear reasonable and
      also mention the distinction between 'CREATE ROLE' and 'CREATE USER'.
      Also, don't say CREATE USER "assumes" LOGIN, but rather "includes".
      
      Patch-by: David G. Johnston, with assumes->includes by me.
      Discussion: https://postgr.es/m/CAKFQuwYrbhKV8hH4TEABrDRBwf=gKremF=mLPQ6X2yGqxgFpYA@mail.gmail.com
      0fe2780d
    • Tom Lane's avatar
      Fix underqualified cast-target type names in pg_dump and psql queries. · 08035146
      Tom Lane authored
      Queries running with some non-pg_catalog schema frontmost in their search
      path need to be careful to schema-qualify type names that should be sought
      in pg_catalog.  Vitaly Burovoy reported an oversight of this sort in
      pg_dump's dumpSequence, and grepping detected another one in psql's
      describeOneTableDetails, both introduced by sequence-related changes in
      v10.  In pg_dump, we can fix things by removing the cast altogether, since
      it doesn't really matter what data types are reported for these query
      result columns.  Likewise in psql, the query seemed to be working unduly
      hard to get a result that's guaranteed to be exactly 'bigint'.
      
      I also changed a couple of occurrences of "::char" similarly.  These are
      not bugs, since "char" is a typename keyword and not subject to search_path
      rules, but it seems better to use uniform style.
      
      Vitaly Burovoy and Tom Lane
      
      Discussion: https://postgr.es/m/CAKOSWN=ds66zLw2SqkLTM8wbXFgDbc_OdkmT3dJfPT2mE5kipA@mail.gmail.com
      08035146