Re: FPW compression leaks information - Mailing list pgsql-hackers
From | Stephen Frost |
---|---|
Subject | Re: FPW compression leaks information |
Date | |
Msg-id | 20150707131508.GH12131@tamriel.snowman.net Whole thread Raw |
In response to | Re: FPW compression leaks information (Fujii Masao <masao.fujii@gmail.com>) |
Responses |
Re: FPW compression leaks information
|
List | pgsql-hackers |
* Fujii Masao (masao.fujii@gmail.com) wrote: > On Thu, Apr 16, 2015 at 4:26 PM, Michael Paquier > <michael.paquier@gmail.com> wrote: > > On Wed, Apr 15, 2015 at 9:42 PM, Michael Paquier > > <michael.paquier@gmail.com> wrote: > >> On Wed, Apr 15, 2015 at 9:20 PM, Michael Paquier > >> <michael.paquier@gmail.com> wrote: > >>> On Wed, Apr 15, 2015 at 2:22 PM, Fujii Masao wrote: > >>>> On Wed, Apr 15, 2015 at 11:55 AM, Michael Paquier wrote: > >>>>> 1) Doc patch to mention that it is possible that compression can give > >>>>> hints to attackers when working on sensible fields that have a > >>>>> non-fixed size. It's more than "hints", from my recollection of what Heikki demonstrated. > >>>> I think that this patch is enough as the first step. > >>> > >>> I'll get something done for that at least, a big warning below the > >>> description of wal_compression would do it. > > > > So here is a patch for this purpose, with the following text being used: > > Thanks for the patch! > > > + <warning> > > + <para> > > + When enabling <varname>wal_compression</varname>, there is a risk > > + to leak data similarly to the BREACH and CRIME attacks on SSL where > > Isn't it better to add the link to the corresponding wikipedia page for > the terms BREACH and CRIME? Isn't policy that we don't link out from our docs..? > > + the compression ratio of a full page image gives a hint of what is > > + the existing data of this page. Tables that contain sensitive > > + information like <structname>pg_authid</structname> with password > > + data could be potential targets to such attacks. Note that as a > > + prerequisite a user needs to be able to insert data on the same page > > + as the data targeted and need to be able to detect checkpoint > > + presence to find out if a compressed full page write is included in > > + WAL to calculate the compression ratio of a page using WAL positions > > + before and after inserting data on the page with data targeted. > > + </para> > > + </warning> > > I think that, in addition to the description of the risk, it's better to > say that this vulnerability is cumbersome to exploit in practice. > > Attached is the updated version of the patch. Comments? Personally, I don't like simply documenting this issue. I'd much rather we restrict the WAL info as it's really got no business being available to the general public. I'd be fine with restricting that information to superusers when compression is enabled, or always, for 9.5 and then fixing it properly in 9.6 by allowing it to be visible to a "pg_monitoring" default role which admins can then grant to users who should be able to see it. Yes, we'll get flak from people who are running with non-superuser monitoring tools today, but we already have a bunch of superuser-only things that monioring tools want, so this doesn't move the needle particularly far, in my view. Thanks! Stephen
pgsql-hackers by date: