Archive of FreeBSD Security general posting, FreeBSD Ports Security Advisory FreeBSD-SA-02:14.pam-pgsql

12/03/02, FreeBSD Ports Security Advisory FreeBSD-SA-02:14.pam-pgsql
From: FreeBSD Security Advisories <security-advisories@FreeBSD.ORG>

Generated by MHonArc

CSIM Logo WelcomeCourses
Faculty, Student, Staff
Projects and reports
Conferences, workshop and seminars
Laboratories and reasearch facilities
Information related to CSIM
Information non-related to CSIM
Address, map, phone, etc.
Search

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]


To: FreeBSD Security Advisories <security-advisories@FreeBSD.ORG>
Subject: FreeBSD Ports Security Advisory FreeBSD-SA-02:14.pam-pgsql
From: FreeBSD Security Advisories <security-advisories@FreeBSD.ORG>
Date: Tue, 12 Mar 2002 06:27:51 -0800 (PST)
List-archive: <http://docs.freebsd.org/mail/> (Web Archive)
List-help: <mailto:majordomo@FreeBSD.ORG?subject=help> (List Instructions)
List-id: <freebsd-security-notifications.FreeBSD.ORG>
List-subscribe: <mailto:majordomo@FreeBSD.ORG?subject=subscribe%20freebsd-security-notifications>
List-unsubscribe: <mailto:majordomo@FreeBSD.ORG?subject=unsubscribe%20freebsd-security-notifications>
Reply-to: postmaster@FreeBSD.ORG
Sender: owner-freebsd-security-notifications@FreeBSD.ORG

-----BEGIN PGP SIGNED MESSAGE-----

=============================================================================
FreeBSD-SA-02:14                                            Security Advisory
                                                                FreeBSD, Inc.

Topic:          pam-pgsql port authentication bypass

Category:       ports
Module:         pam-pgsql
Announced:      2002-03-12
Credits:        Jacques A. Vidrine <nectar@FreeBSD.org>
Affects:        pam-pgsql port prior to pam-pgsql-0.5.2
Corrected:      2002-01-21 20:06:05 UTC
FreeBSD only:   NO

I.   Background

pam-pgsql is a PAM module which allows PAM-enabled applications such
as login(1) to use a PostgreSQL database for user authentication.

II.  Problem Description

The affected versions of the pam-pgsql port contain a vulnerability
that may allow a remote user to cause arbitrary SQL code to be
executed.  pam-pgsql constructs a SQL statement to be executed by the
PostgreSQL server in order to lookup user information, verify user
passwords, and change user passwords.  The username and password given
by the user is inserted into the SQL statement without any quoting or
other safety checks.

The pam-pgsql port is not installed by default, nor is it "part of
FreeBSD" as such: it is part of the FreeBSD ports collection, which
contains thousands of third-party applications in a ready-to-install
format. The ports collection shipped with FreeBSD 4.4 contains this
problem since it was discovered after the release.

FreeBSD makes no claim about the security of these third-party
applications, although an effort is underway to provide a security
audit of the most security-critical ports.

III. Impact

A user interacting with a PAM-enabled application may insert arbitrary
SQL code into the username or password fields during authentication or
while changing passwords, leading to several exploit opportunities.
In all versions of the pam-pgsql port prior to 0.5.2, attackers may
add or change user account records.  In addition, in versions of the
pam-pgsql port prior to 0.3, attackers may cause pam-pgsql to
completely bypass password authentication, allowing them to
authenticate as any user and obtain unauthorized access using the
PAM-enabled application.  Since common PAM applications include
login(1) and sshd(8), both local and remote attacks are possible.

IV.  Workaround

1) Deinstall the pam-pgsql port/package if you have it installed.

V.   Solution

One of the following:

1) Upgrade your entire ports collection and rebuild the port.

2) Download a new port skeleton for the pam-pgsql port from:

http://www.freebsd.org/ports/

and use it to rebuild the port.

3) Use the portcheckout utility to automate option (2) above. The
portcheckout port is available in /usr/ports/devel/portcheckout or the
package can be obtained from:

ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-4-stable/Latest/portcheckout.tgz

VI.  Correction details

The following list contains the revision numbers of each file that was
corrected in the FreeBSD Ports Collection.

Path                                                             Revision
- -------------------------------------------------------------------------
ports/security/pam-pgsql/Makefile                                     1.9
ports/security/pam-pgsql/distinfo                                     1.3
ports/security/pam-pgsql/pkg-descr                                    1.2
- -------------------------------------------------------------------------

VII. References

This vulnerability is very similar to previous vulnerabilities
involving Apache modules and discovered by RUS-CERT.
<URL:http://cert.uni-stuttgart.de/advisories/apache_auth.php>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org

iQCUAwUBPI4OwVUuHi5z0oilAQGXIgP4pJSV/n8+rQG8xj69zvyquOzjaYJW3aP3
0OvjTDmBh2NsB4y/3bxFzYnZnTH5reDEMtZnznpBGAElvibXesRN1f4NTaPa2mWo
qpNF9ELBdNtGGqUZy6hm3kLjdgggpzTLP8luvt1tXdR4WRBgI48c8WxYxYd/u3oa
g/gXHvFK2Q==
=PWQc
-----END PGP SIGNATURE-----

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-security-notifications" in the body of the message


Previous message sorted by date: FreeBSD Security Advisory FreeBSD-SA-02:13.openssh
Next message sorted by date: FreeBSD Ports Security Advisory FreeBSD-SA-02:15.cyrus-sasl
Previous message sorted by thread: FreeBSD Security Advisory FreeBSD-SA-02:13.openssh
Next message by thread: FreeBSD Ports Security Advisory FreeBSD-SA-02:15.cyrus-sasl
Main Index
Thread Index

CSIM home pageWMailAccount managementCSIM LibraryNetwork test toolsSearch CSIM directories
Contact us: Olivier Nicole CSIM    SET    AIT Last update: Jan 2003