Description of problem: All currently shipped versions of PostgreSQL are vulnerable to a new type of attack pointed out by Gurjeet Singh. The scenario is similar to CVE-2007-6600 in that an attacker must be an authenticated user so that he can create a table with attached indexes, which reference functions he has created. Subsequent maintenance operations performed by database superusers will then have to execute those functions. In -6600 the threat was simply to acquire the caller's privileges directly. However, another possibility is that the index function can modify session-local state in a way that will subvert later operations in the same session. Examples include changing the search_path so that an attacker-created function will be invoked instead of the intended one, or replacing an existing prepared statement with a new one containing code of the attacker's choosing. There have up to now been only very limited security controls on most session-local state, so it was easy to think of possible attack vectors once the basic issue was recognized. This attack is less dangerous than -6600 since it only succeeds if the calling session does something subvert-able later. In particular it's not clear that there's any major risk for automatic vacuum operations. But superusers who do manual vacuuming or reindexing are clearly at risk. Upstream versions due to be announced Monday 12-14 contain assorted fixes meant to mitigate this scenario.
This is now public and has been addressed upstream in 8.4.2, 8.3.9, 8.2.15, 8.1.19, 8.0.23, and 7.4.27, as per http://www.postgresql.org/support/security.html .
Upstream commit: http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=31d0bddf77b9e2b5581816aa96d3a392ab7d8543
postgresql-8.3.9-1.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/postgresql-8.3.9-1.fc11
postgresql-8.3.9-1.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
postgresql-8.4.2-1.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
This issue has been addressed in following products: Red Hat Enterprise Linux 3 Via RHSA-2010:0427 https://rhn.redhat.com/errata/RHSA-2010-0427.html
This issue has been addressed in following products: Red Hat Enterprise Linux 4 Via RHSA-2010:0428 https://rhn.redhat.com/errata/RHSA-2010-0428.html
This issue has been addressed in following products: Red Hat Enterprise Linux 5 Via RHSA-2010:0429 https://rhn.redhat.com/errata/RHSA-2010-0429.html