Re: SSL over Unix-domain sockets

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Mark Mielke <mark(at)mark(dot)mielke(dot)cc>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: SSL over Unix-domain sockets
Date: 2008-01-17 13:44:12
Message-ID: 20080117134412.GC17828@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> > Perhaps the easiest thing to do is to create a (possibly dangling)
> > symlink in /tmp to the real socket in a protected dir.
>
> Cute idea ...
>
> > One thing to be aware of is /tmp cleaners ...
>
> ... but that would definitely be a problem. I think on most systems
> you'd have to explicitly tweak the /tmp-cleaning script to know not to
> zap such a link. Given that such a local customization would probably
> disappear in your next system update, the security gain might be
> fleeting.

Ok, I checked on my system and if I upgrade the /tmp cleaner
(tmpreaper), my customization to the config file is not lost.

Somebody else said elsewhere that if you configure tmpwatch on Redhat
and later upgrade it, the config change is not lost.

That's two popular platforms on which this is a surmountable problem.

So my suggestion is to document this threat, the dangling-symlink
approach, and the need to configure the system's /tmp-cleaner.
Additionally, we can patch the postmaster so that it throws a WARNING if
it finds that the /tmp symlink (when configured to put the socket
somewhere else) is not present.

BTW I noticed that tmpreaper is disabled even after installed,
mentioning a security flaw which is said to be impossible to close --
and points to
http://lists.openwall.net/full-disclosure/2002/12/20/19

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2008-01-17 13:48:14 Re: [ADMIN] postgresql in FreeBSD jails: proposal
Previous Message Florian G. Pflug 2008-01-17 11:30:36 Re: Postgresql Materialized views

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2008-01-17 13:48:14 Re: [ADMIN] postgresql in FreeBSD jails: proposal
Previous Message Stefan Schwarzer 2008-01-17 11:59:05 Re: Forgot to dump old data before re-installing machine