[COMMITTERS] pgsql: start-scripts: switch to $PGUSER before opening $PGLOG. - Mailing list pgsql-committers

From Noah Misch
Subject [COMMITTERS] pgsql: start-scripts: switch to $PGUSER before opening $PGLOG.
Date
Msg-id E1eBj4z-0002Pi-1l@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
start-scripts: switch to $PGUSER before opening $PGLOG.

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/dfc015dcf46c1996bd7ed5866e9e045d258604b3

Modified Files
--------------
contrib/start-scripts/freebsd        | 4 ++--
contrib/start-scripts/linux          | 4 ++--
contrib/start-scripts/osx/PostgreSQL | 8 ++++----
3 files changed, 8 insertions(+), 8 deletions(-)


--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

pgsql-committers by date:

Previous
From: Dean Rasheed
Date:
Subject: [COMMITTERS] pgsql: Always require SELECT permission for ON CONFLICT DO UPDATE.
Next
From: Tom Lane
Date:
Subject: [COMMITTERS] pgsql: Make json{b}_populate_recordset() use the right tupledescriptor