pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Refactor permissions checks for large objects.
Date: Thu, 09 Nov 2017 17:56:15 +0000
Message-ID: <E1eCr3n-0004y6-Rh@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Refactor permissions checks for large objects.

Up to now, ACL checks for large objects happened at the level of
the SQL-callable functions, which led to CVE-2017-7548 because of a
missing check.  Push them down to be enforced in inv_api.c as much
as possible, in hopes of preventing future bugs.  This does have the
effect of moving read and write permission errors to happen at lo_open
time not loread or lowrite time, but that seems acceptable.

Michael Paquier and Tom Lane

Discussion: https://postgr.es/m/CAB7nPqRHmNOYbETnc_2EjsuzSM00Z+BWKv9sy6tnvSd5gWT_JA@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/catalog/objectaddress.c        |   2 +-
src/backend/libpq/be-fsstubs.c             |  88 +++++------------------
src/backend/storage/large_object/inv_api.c | 108 +++++++++++++++++++++++------
src/backend/utils/misc/guc.c               |  12 ++--
src/include/libpq/be-fsstubs.h             |   5 --
src/include/storage/large_object.h         |  13 ++--
6 files changed, 117 insertions(+), 111 deletions(-)


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


Message-ID: <E1eCr3n-0004y6-Rh@gemulon.postgresql.org>
Permalink:  ../E1eCr3n-0004y6-Rh@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1eCr3n-0004y6-Rh@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Refactor permissions checks for large objects.
  In-Reply-To: <E1eCr3n-0004y6-Rh@gemulon.postgresql.org>
  References: <E1eCr3n-0004y6-Rh@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox