pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Fetter <david@fetter.org>
To: PG Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [BUGS] BUG #6189: libpq: sslmode=require verifies server certificate if root.crt is present
Date: Mon, 12 Sep 2011 10:21:26 -0700
Message-ID: <20110912172126.GA12610@fetter.org> (raw)
In-Reply-To: <201108310959.p7V9xIRp030425@wwwmaster.postgresql.org>
References: <201108310959.p7V9xIRp030425@wwwmaster.postgresql.org>

On Wed, Aug 31, 2011 at 09:59:18AM +0000, Srinivas Aji wrote:
> 
> The following bug has been logged online:
> 
> Bug reference:      6189
> Logged by:          Srinivas Aji
> Email address:      srinivas.aji@emc.com
> PostgreSQL version: 9.0.4
> Operating system:   Linux
> Description:        libpq: sslmode=require verifies server certificate if
> root.crt is present
> Details: 
> 
> >From the documentation of sslmode values in
> http://www.postgresql.org/docs/9.0/static/libpq-ssl.html ,
> it looks like libpq will not verify the server certificate when the option
> sslmode=require is used, and will perform different levels of certificate
> verification in the cases sslmode=verify-ca and sslmode=verify-full.
> 
> The observed behaviour is a bit different. If the ~/.postgresql/root.crt
> file (or any other filename set through sslrootcert option) is found,
> sslmode=require also performs the same level of certificate verification as
> verify-ca. The difference between require and verify-ca is that it is an
> error for the file to not exist when sslmode is verify-ca.
> 
> Thanks,
> Srinivas

It looks to me like there could at least in theory be an attack vector
or two that we're not covering with this bug.  Anybody want to tackle
same?

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



view thread (16+ messages)  latest in thread

Message-ID: <20110912172126.GA12610@fetter.org>
Permalink:  ../20110912172126.GA12610@fetter.org/
Also on:    postgresql.org/message-id/20110912172126.GA12610@fetter.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-bugs@postgresql.org
  Cc: david@fetter.org, pgsql-hackers@postgresql.org
  Subject: Re: [BUGS] BUG #6189: libpq: sslmode=require verifies server certificate if root.crt is present
  In-Reply-To: <20110912172126.GA12610@fetter.org>
  References: <201108310959.p7V9xIRp030425@wwwmaster.postgresql.org> <20110912172126.GA12610@fetter.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