postgresql/contrib/pg_upgrade
Noah Misch 95a6855c55 Obstruct shell, SQL, and conninfo injection via database and role names.
Due to simplistic quoting and confusion of database names with conninfo
strings, roles with the CREATEDB or CREATEROLE option could escalate to
superuser privileges when a superuser next ran certain maintenance
commands.  The new coding rule for PQconnectdbParams() calls, documented
at conninfo_array_parse(), is to pass expand_dbname=true and wrap
literal database names in a trivial connection string.  Escape
zero-length values in appendConnStrVal().  Back-patch to 9.1 (all
supported versions).

Nathan Bossart, Michael Paquier, and Noah Misch.  Reviewed by Peter
Eisentraut.  Reported by Nathan Bossart.

Security: CVE-2016-5424
2016-08-08 10:07:52 -04:00
..
.gitignore Update .gitignore for pg_upgrade 2014-12-17 11:59:29 +01:00
check.c pg_upgrade: suppress creation of delete script 2016-02-18 18:32:26 -05:00
controldata.c Fix spelling mistake. 2016-01-14 23:16:11 -05:00
dump.c Obstruct shell, SQL, and conninfo injection via database and role names. 2016-08-08 10:07:52 -04:00
exec.c Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
file.c pg_upgrade: fix CopyFile() on Windows to fail on file existence 2015-11-24 17:18:27 -05:00
function.c Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
IMPLEMENTATION Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
info.c pg_dump, pg_upgrade: allow postgres/template1 tablespace moves 2015-09-11 15:51:10 -04:00
Makefile Fix pg_dump to handle inherited NOT VALID check constraints correctly. 2015-10-01 16:19:49 -04:00
option.c Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
page.c Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
parallel.c pg_upgrade: clarify C comment about Windows thread struct pointers 2013-07-30 09:23:31 -04:00
pg_upgrade.c Obstruct shell, SQL, and conninfo injection via database and role names. 2016-08-08 10:07:52 -04:00
pg_upgrade.h Obstruct shell, SQL, and conninfo injection via database and role names. 2016-08-08 10:07:52 -04:00
relfilenode.c Remove tabs after spaces in C comments 2014-05-06 11:26:28 -04:00
server.c Obstruct shell, SQL, and conninfo injection via database and role names. 2016-08-08 10:07:52 -04:00
tablespace.c pg_upgrade: throw an error for non-existent tablespace directories 2014-04-17 11:42:21 -04:00
test.sh Obstruct shell, SQL, and conninfo injection via database and role names. 2016-08-08 10:07:52 -04:00
TESTING Remove whitespace from end of lines 2012-05-15 22:19:41 +03:00
util.c Obstruct shell, SQL, and conninfo injection via database and role names. 2016-08-08 10:07:52 -04:00
version.c Obstruct shell, SQL, and conninfo injection via database and role names. 2016-08-08 10:07:52 -04:00
version_old_8_3.c Obstruct shell, SQL, and conninfo injection via database and role names. 2016-08-08 10:07:52 -04:00