pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Jeffrey Walton <noloader@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: be-secure.c and SSL/TLS
Date: Thu, 14 Nov 2013 17:31:55 -0300
Message-ID: <20131114203155.GC7583@eldon.alvh.no-ip.org> (raw)
In-Reply-To: <CAH8yC8mXTzXmNFj9SD4A6cYoNCo+SCsPwLRw3J9kAiQA=k=jDw@mail.gmail.com>
References: <CAH8yC8mXTzXmNFj9SD4A6cYoNCo+SCsPwLRw3J9kAiQA=k=jDw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Jeffrey Walton escribió:

> `initialize_SSL` starts around line 725. `SSL_CTX_set_options` is
> called around line 795, but it only bans SSLv3 with SSL_OP_NO_SSLv2.
> In 2013, SSL_OP_NO_SSLv3 is appropriate, too.
> 
> SSL_OP_NO_COMPRESSION might also be a good choice.

Agreed on banning SSLv3.

> Around line 795, the following is called.
> 
>     /* set up the allowed cipher list */
>     if (SSL_CTX_set_cipher_list(SSL_context, SSLCipherSuites) != 1)
> 
> But I don't see where SSLCipherSuites is set to anything other than
> NULL. (Unfortunately, I don't know the behavior when using NULL).

See guc.c.

> Postgres takes care to ensure cipher suites with perfect forward
> secrecy are used. Its a great effort and sorely needed.
> 
> However, session renegotiation breaks PFS. Around line 330:
> 
>     if (SSL_renegotiate(port->ssl) <= 0)
>         ereport(COMMERROR,
>             (errcode(ERRCODE_PROTOCOL_VIOLATION),
>             errmsg("SSL renegotiation failure")));
> 
> It breaks PFS because the premaster secret and session_id are retained
> for future renegotiations. If the server is operating in a farm *and*
> in-memory IPC is not available, then it gets written to disk, too.

What's the solution for this?  Are you suggesting we should just not use
renegotiation at all?  AFAIK that's a security problem too, because an
attacker would have large amounts of crypted data for cryptanalysis.


-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services


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



view thread (2+ messages)

Message-ID: <20131114203155.GC7583@eldon.alvh.no-ip.org>
Permalink:  ../20131114203155.GC7583@eldon.alvh.no-ip.org/
Also on:    postgresql.org/message-id/20131114203155.GC7583@eldon.alvh.no-ip.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: alvherre@2ndquadrant.com, noloader@gmail.com
  Subject: Re: be-secure.c and SSL/TLS
  In-Reply-To: <20131114203155.GC7583@eldon.alvh.no-ip.org>
  References: <CAH8yC8mXTzXmNFj9SD4A6cYoNCo+SCsPwLRw3J9kAiQA=k=jDw@mail.gmail.com> <20131114203155.GC7583@eldon.alvh.no-ip.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