Gentoo Logo

PostgreSQL: Insecure temporary file use in make_oidjoins_check


1.  Gentoo Linux Security Advisory

Version Information

Advisory Reference GLSA 200410-16 / PostgreSQL
Release Date October 18, 2004
Latest Revision May 28, 2009: 04
Impact normal
Exploitable local
Package Vulnerable versions Unaffected versions Architecture(s)
dev-db/postgresql <= 7.4.5-r1 >= 7.4.5-r2, revision >= 7.3.7-r2, revision >= 7.3.15, revision >= 7.3.16, revision >= 7.3.18, revision >= 7.3.21 All supported architectures

Related bugreports: #66371


The make_oidjoins_check script, part of the PostgreSQL package, is vulnerable to symlink attacks, potentially allowing a local user to overwrite arbitrary files with the rights of the user running the utility.

2.  Impact Information


PostgreSQL is an open source database based on the POSTGRES database management system. It includes several contributed scripts including the make_oidjoins_check script.


The make_oidjoins_check script insecurely creates temporary files in world-writeable directories with predictable names.


A local attacker could create symbolic links in the temporary files directory, pointing to a valid file somewhere on the filesystem. When make_oidjoins_check is called, this would result in file overwrite with the rights of the user running the utility, which could be the root user.

3.  Resolution Information


There is no known workaround at this time.


All PostgreSQL users should upgrade to the latest version:

Code Listing 3.1: Resolution

# emerge sync

# emerge -pv ">=dev-db/postgresql-7.4.5-r2"
# emerge ">=dev-db/postgresql-7.4.5-r2"

Upgrade notes: PostgreSQL 7.3.x users should upgrade to the latest available 7.3.x version to retain database compatibility.

4.  References


Page updated October 18, 2004

Summary: This is a Gentoo Linux Security Advisory

Security Team
Contact Address

Donate to support our development efforts.

Copyright 2001-2015 Gentoo Foundation, Inc. Questions, Comments? Contact us.