Live data from Hacker News

PostgreSQL 9.2.4, 9.1.9, 9.0.13 and 8.4.17 released

postgresql.org

61–70 of 105 posts

Re: PostgreSQL 9.2.4, 9.1.9, 9.0.13 and 8.4.17 released

#61

"Heroku was given access to updated source code which patched the vulnerability at the same time as other packagers. Because Heroku was especially vulnerable, the PostgreSQL Core Team worked with them both to secure their infrastructure and to use their deployment as a test-bed for the security patches, in order to verify that the security update did not break any application functionality. Heroku has a history both…

I would definitely pay Heroku a bit more to restrict access of a Heroku PG instance to a given EC2 security group. I couldn't find a PG hosting provider with more useful features than Heroku - with that, it would be a killer option.

Well, I'll tell you why it is not implemented that way. I hope the restriction can be lifted some day. I am a member of the Heroku staff related to the matters at hand.

The problem is the sheer number of Heroku Runtime machines which are located in a smattering of IP space, and rapidly and accurately propagating the firewall rules required for tight network access control as applications churn around in there...even then, there have been some reports of voluminous firewall rules causing obscure problems. Of course: the world is an obscure place and yet we can deal with it in time. Such a thing could be hardened I'm sure, but the amount of bookkeeping required is a bit terrifying, and experience suggests that will not go entirely smoothly or be easy to find bugs in. At the time this was reasoned out (maybe about two years ago?), it wasn't even widely known that Heroku offered any data storage service of significance. Early days.

So, the simple approach is to enable access from the entire Heroku Runtime layer. But who can put applications there? Anybody on the Internet. That's why the 'ingress' feature to poke a temporary hole in the database firewall was dropped as too marginal given the fairly severe inconvenience of it all -- it had the feel of a weird Heroku-ism, especially in light of the lack of attacks using unauthenticated clients on Postgres, until this date. In addition, what about all the other addons? There would need to be an API, and because of the nature of what it is doing (poking holes before beginning, say, TLS negotiation which requires even more round trips and is slow enough as it is) it would need to be stable, fast, accurate, and all that other good stuff, lest all addons effectively be rendered offline all at once.

Other more application-level approaches are possible (like tunneling all connections to a local unix socket, or something), but that's but a little strange, because it requires code injection of strange stuff into the running container, makes your URLs look funny, and so on. This model has been experimented with by some of my colleagues and staff of other, similar firms, and definitely has its attractive sides. Nevertheless, one of the general guidelines in our implementation choices is to not be too weird for someone moving on or off the service. These approaches are also not in and of themselves immune to DoS or security problems...they need careful auditing. Maybe another look is indicated. And again: what about every other addon? What about your local computer? Are you going to install some weird agent, open source or no, from every such addon?

My personal favorite pie in the sky option right now would be cordon off a slice of contiguous, publicly addressable (but not publicly accessible) IP space so that firewall rules could remain compact and slower changing, and also involve your local computer: imagine being able to VPN to two or three such networks simultaneously, because their addressing does not alias at all. But this is still in the realm of fantasy, and and probably would require looking at IPv6 to be able to segment the address space in a sane manner, which compounds another layer of stuff that can be buggy, even in such mundane details as address parsing.

So....there's some rambling, but I thought it perhaps useful to talk about some of the challenges here to motivate the discussion.

Re: PostgreSQL 9.2.4, 9.1.9, 9.0.13 and 8.4.17 released

#62
post #33

Earlier quoted context omitted.

To be sure, you should upgrade. Why do you not want to upgrade?

[not gp post, but this is a normal situation] Because some folks need to go through a long, drawn out process to upgrade internal software and might already have some place in the pipeline to put the upgrade so it will get tested with everything else. If its a security issue for your current installation, you go now and hope, but if it can wait for a release then you do that.

It seems to me that even large, overly bureaucratic corporations need a process in place that allows deploying critical security updates in a reasonably expedient manner. Is this uncommon?

Re: PostgreSQL 9.2.4, 9.1.9, 9.0.13 and 8.4.17 released

#63
post #38

Earlier quoted context omitted.

It certainly seems feasible with the use of VPC and Security Groups. At the very least I think they should offer an option that only you to restrict access so only your dynos have access to the postgres port.

I'd love to use it with any EC2 installation (EngineYard, stock EC2 etc). If only they could limit access to EC2 security groups, it would be amazing.

That would be great.

Security Groups work across accounts, so Heroku (or whoever) could let you provide your account ID and Security Group name, then authorise access from this group.

Re: PostgreSQL 9.2.4, 9.1.9, 9.0.13 and 8.4.17 released

#64
post #51

Earlier quoted context omitted.

And the author is a fantastic coder/developer, really! https://en.wikipedia.org/wiki/Tom_Lane_%28computer_scientist...

Tom committed the fix, he didn't author it.

The author of the commit message I think is what the op was implying.

Re: PostgreSQL 9.2.4, 9.1.9, 9.0.13 and 8.4.17 released

#65
post #51

Earlier quoted context omitted.

And the author is a fantastic coder/developer, really! https://en.wikipedia.org/wiki/Tom_Lane_%28computer_scientist...

Tom committed the fix, he didn't author it.

Who writes commit messages for these kinds of user-submitted patches? The author or the committer?

Re: PostgreSQL 9.2.4, 9.1.9, 9.0.13 and 8.4.17 released

#66
post #61

Earlier quoted context omitted.

I would definitely pay Heroku a bit more to restrict access of a Heroku PG instance to a given EC2 security group. I couldn't find a PG hosting provider with more useful features than Heroku - with that, it would be a killer option.

Well, I'll tell you why it is not implemented that way. I hope the restriction can be lifted some day. I am a member of the Heroku staff related to the matters at hand. The problem is the sheer number of Heroku Runtime machines which are located in a smattering of IP space, and rapidly and accurately propagating the firewall rules required for tight network access control as applications churn around in there...even…

Thanks for the insights - much appreciated :-)

Re: PostgreSQL 9.2.4, 9.1.9, 9.0.13 and 8.4.17 released

#67
post #60
post #55

Earlier quoted context omitted.

The exploit does not actually destroy the files. It allows appending data to the files making the server crash. The file could be recovered by simply removing the junk data added to it. From the FAQ: > Persistent Denial of Service: an unauthenticated attacker may use this vulnerability to cause PostgreSQL error messages to be appended to targeted files in the PostgreSQL data directory on the server. Files corrupted i…

You actually expect most users to figure that out? Especially if corrupted with stuff that looks vaguely like regular postgres data...

Doesn't matter if they can figure it out or not. The data isn't lost, which is the salient point there. There is the potential for datafile corruption, but that is not the same as data corruption or data loss. All your bits are still there and can be recovered by someone with the right expertise.

Re: PostgreSQL 9.2.4, 9.1.9, 9.0.13 and 8.4.17 released

#68
post #51

Earlier quoted context omitted.

That is a fantastic commit message. I try and convince anyone I work with that they should write commit messages like this. Slowly, but surely, they come around.

And the author is a fantastic coder/developer, really! https://en.wikipedia.org/wiki/Tom_Lane_%28computer_scientist...

What gets me about Tom Lane is that he's _so active_ on the mailing list(s).

It seems that every time I search the archives regarding an issue I'm having: I find a reply authored by Tom Lane.

Re: PostgreSQL 9.2.4, 9.1.9, 9.0.13 and 8.4.17 released

#69

Earlier quoted context omitted.

[not gp post, but this is a normal situation] Because some folks need to go through a long, drawn out process to upgrade internal software and might already have some place in the pipeline to put the upgrade so it will get tested with everything else. If its a security issue for your current installation, you go now and hope, but if it can wait for a release then you do that.

It seems to me that even large, overly bureaucratic corporations need a process in place that allows deploying critical security updates in a reasonably expedient manner. Is this uncommon?

Well, it's only a critical security update if it affects your installation. If there's a way to protect without a quick rush software upgrade, you may as well wait until the next scheduled software upgrade.

Re: PostgreSQL 9.2.4, 9.1.9, 9.0.13 and 8.4.17 released

#70
post #61

Earlier quoted context omitted.

I would definitely pay Heroku a bit more to restrict access of a Heroku PG instance to a given EC2 security group. I couldn't find a PG hosting provider with more useful features than Heroku - with that, it would be a killer option.

Well, I'll tell you why it is not implemented that way. I hope the restriction can be lifted some day. I am a member of the Heroku staff related to the matters at hand. The problem is the sheer number of Heroku Runtime machines which are located in a smattering of IP space, and rapidly and accurately propagating the firewall rules required for tight network access control as applications churn around in there...even…

you can do the IP space thing with IPv6.
Post reply on HN