A few short notes about PostgreSQL and POODLE

The POODLE attack on https (the attack is about https, the vulnerability in SSL, an important distinction) has received a lot of media attention lately, so I figured a (very) short writeup was necessary.

The TL;DR; version is, you don't have to worry about POODLE for your PostgreSQL connections when using SSL.

The slightly longer version can be summarized by:

  • The PostgreSQL libpq client in all supported versions will only connect with TLSv1, which is not vulnerable.
  • The PostgreSQL server prior to the upcoming 9.4 version will however respond in SSLv3 (which is the vulnerable version) if the client insists on it (which a third party client can do).
  • To exploit POODLE, you need a client that explicitly does out-of-protocol downgrading. Something that web browsers do all the time, but very few other clients do. No known PostgreSQL client library does.
  • To exploit POODLE, the attacker needs to be able to modify the contents of the encrypted stream - it cannot be passively broken into. This can of course happen if the attacker can control parameters to a SQL query for example, but the control over the data tends to be low, and the attacker needs to already control the client. In the https attack, this is typically done through injecting javascript.
  • To exploit POODLE, there needs to be some persistent secret data at a fixed offset in each connection. This is extremely unlikely in PostgreSQL, as the protocol itself has no such data. There is a "cancel key" at the same location in each stream, but it is not reused and a new one is created for each connection. This is where the https attack typically uses the session cookie which is both secret and fixed location in the request header.

For a really good writeup on the problem, see this post from PolarSSL, or this one from GnuTLS.


Conferences

I speak at and organize conferences around Open Source in general and PostgreSQL in particular.

Upcoming

PGDaySF 2020
Jan 21, 2020
San Francisco, USA
FOSDEM PGDay 2020
Jan 31-Feb 2, 2020
Brussels, Belgium
Nordic PGDay 2020
Mar 24-20, 2020
Helsinki, Finland
PGCon 2020
May 26-29, 2020
Ottawa, Canada
PGConf.EU 2020
Oct 20-23, 2020
Berlin, Germany

Past

Stockholm PostgreSQL Meetup
Dec 3, 2019
Stockholm, Sweden
Berlin PostgreSQL Meetup
Nov 21, 2019
Berlin, Germany
Chicago PostgreSQL Meetup
Nov 12, 2019
Chicago, USA
PGConf.EU 2019
Oct 15-18, 2019
Milan, Italy
Postgres Open 2019
Sep 11-13, 2019
Orlando, FL, USA
More past conferences