IBM AIX(r) Security Vulnerabilities (gethostbyname, lquerypv)
Privacy and Legal Notice
INFORMATION BULLETIN
H-13: IBM AIX(r) Security Vulnerabilities (gethostbyname,lquerypv)
December 10, 1996 23:00 GMT
PROBLEM: Two problems have been identified in IBM AIX: (1) Possible
buffer overrun condition in "gethostbyname()" library function,
and (2) the "lquerypv" command does not correctly enforce file
access permissions.
PLATFORM: (1) IBM AIX 3.2.x, 4.1.x, 4.2.x, (2) IBM AIX 4.1, 4.2
DAMAGE: (1) If exploited, this condition may permit unauthorized
super-user access to the system. (2) Users who know how to
exploit this vulnerability may be able to read files they would
not normally have access to.
SOLUTION: Apply the fix described below.
VULNERABILITY Instructions on how to exploit these vulnerabilities have been
ASSESSMENT: published on the Internet.
[ Start IBM-ERS Bulletins ]
1. Vulnerability in gethostbyname() library function
===============================================================================
======= ============ ====== ======
======= ============== ======= =======
=== === ==== ====== ======
=== =========== ======= =======
=== =========== === ======= ===
=== === ==== === ===== ===
======= ============== ===== === =====
======= ============ ===== = =====
EMERGENCY RESPONSE SERVICE
SECURITY VULNERABILITY ALERT
03 December 1996 18:30 GMT Number: ERS-SVA-E01-1996:007.1
===============================================================================
VULNERABILITY SUMMARY
VULNERABILITY: Possible buffer overrun condition in "gethostbyname()" library
function
PLATFORMS: IBM AIX(r) 3.2.x, 4.1.x, 4.2.x
SOLUTION: Apply the fixes described below
THREAT: If exploited, this condition may permit unauthorized super-user
access to the system
===============================================================================
DETAILED INFORMATION
I. Description
In TCP/IP networks such as the Internet and many corporate networks, hosts are
identified by 32-bit numbers called addresses. However, because these numbers
are difficult to remember, names are also given to hosts. Although people use
the names to refer to the hosts, computer software must translate these names
into the numeric addresses in order to use them.
The Domain Name System (DNS), also called "the name server," is the primary
database used to perform these name-to-address (and address-to-name)
translations. Other databases, such as the Network Information System (NIS,
formerly called Yellow Pages) and the "hosts file" are also used on some
systems.
When a program on a UNIX system wants to look up a host's name and obtain its
network address, it uses a library function called "gethostbyname()." This
function takes a host name as a parameter, contacts the Domain Name System (or
another source of information), and returns the host's address(es) to the
program. This saves the programmer the trouble of writing the complex code to
interface with the name server.
Under certain conditions, the "gethostbyname()" library function provided with
IBM AIX versions 3.2.x, 4.1.x, and 4.2.x can encounter a buffer overrun that
allows information on the program stack to be corrupted.
II. Impact
Many set-user-id and set-group-id programs, as well as many network programs
running with super-user privileges, make use of the "gethostbyname()" library
function. Corrupting the program stack of these programs may allow arbitrary
user-provided code to be executed inadvertently.
If successfully exploited, this buffer overrun condition could be used to gain
super-user access to the system. Such an action could be initiated over the
network from a remote system, or by a user on the local system. Penetration
through a firewall may also be possible, depending on which services and
applications are permitted by the firewall system.
A script that exploits a similar buffer overrun condition in the Sun Solaris
2.x version of "gethostbyname()" was publicly released in November, 1996. Sun
Microsystems announced fixes for that condition in Security Bulletin 137, which
was released on 20 Nov 96.
As of this writing, IBM-ERS is not aware of any similar exploitation script for
the AIX operating system, nor are we aware of any successful exploitations of
this condition (against either AIX systems or Solaris systems).
III. Solutions
The following Automated Program Analysis Reports (APARs) for IBM AIX are now
available to address the concerns described above:
AIX 3.2.x
---------
APAR - IX60927 (PTF - U443452,U444191,U444206,U444213,U444233,U444244)
To determine if you have this PTF on your system, run the following
command:
lslpp -lB U443452 U444191 U444206 U444213 U444233 U444244
AIX 4.1.x
---------
APAR - IX61019
To determine if you have this APAR on your system, run the following
command:
instfix -ik IX61019
AIX 4.2.x
---------
APAR - IX62144
To determine if you have this APAR on your system, run the following
command:
instfix -ik IX62144
IBM AIX APARs may be ordered using Electronic Fix Distribution (via the
FixDist program), or from the IBM Support Center. For more information on
FixDist, and to obtain fixes via the Internet, please reference
http://service.software.ibm.com/aixsupport/
or send electronic mail to "aixserv@austin.ibm.com" with the word "FixDist" in
the "Subject:" line.
IV. Acknowledgements
IBM-ERS would like to thank the CERT Coordination Center (CERT/CC), AUSCERT,
Sun Microsystems, and Marko Laakso (University of Oulu) for providing some of
the information in this advisory.
AIX is a registered trademark of International Business Machines Corporation.
===============================================================================
2. Vulnerability in "lquerypv" command
===============================================================================
======= ============ ====== ======
======= ============== ======= =======
=== === ==== ====== ======
=== =========== ======= =======
=== =========== === ======= ===
=== === ==== === ===== ===
======= ============== ===== === =====
======= ============ ===== = =====
EMERGENCY RESPONSE SERVICE
SECURITY VULNERABILITY ALERT
03 December 1996 18:30 GMT Number: ERS-SVA-E01-1996:008.1
===============================================================================
VULNERABILITY SUMMARY
VULNERABILITY: The "lquerypv" command does not correctly enforce file access
permissions.
PLATFORMS: IBM AIX(r) 4.1, 4.2
SOLUTION: Apply the fix described below.
THREAT: Users who know how to exploit this vulnerability may be able to
read files they would not normally have access to.
===============================================================================
DETAILED INFORMATION
I. Description
The "lquerypv" command is an undocumented, low-level worker program that is a
part of the AIX Logical Volume Manager family of commands. When installed, the
"lquerypv" command is set-user-id "root", which allows it to run with
super-user access permissions.
When invoked with the "-h" option, "lquerypv" does not adequately enforce the
read permissions on files when it is run by regular (non-"root") users. This
can allow users to obtain access to the contents of files that they are not
authorized to read.
Instructions for exploiting this vulnerability were made available on USENET
newsgroups and Internet mailing lists in November, 1996.
II. Impact
Allowing users to obtain unauthorized access to file contents can reveal such
confidential information as encrypted passwords, electronic mail, and other
data.
III. Solutions
A. How to alleviate the problem
This problem can be alleviated by removing the set-user-id bit from the
"lquerypv" program. To do this, execute the following command as "root":
chmod u-s /usr/sbin/lquerypv
Note that this action will cause some Logical Volume Manager commands to
fail when they are executed by non-"root" users (such as "lsps"). It will
not affect the operation of these commands when they are executed by
"root".
B. Official fix
The following Automated Program Analysis Reports (APARs) for IBM AIX are
now available to address this problem:
AIX 3.2.x
---------
Not vulnerable; no fix necessary.
AIX 4.1.x
---------
APAR - IX64203
To determine if you have this APAR on your system, run the following
command:
instfix -ik IX64203
Or, run this command:
lslpp -h bos.rte.lvm
and verify that your version of bos.rte.lvm is 4.1.5.3 or later.
AIX 4.2.x
---------
APAR - IX64204
To determine if you have this APAR on your system, run the following
command:
instfix -ik IX64204
Or, run this command:
lslpp -h bos.rte.lvm
and verify that your version of bos.rte.lvm is 4.2.0.7 or later.
IBM AIX APARs may be ordered using Electronic Fix Distribution (via the FixDist
program), or from the IBM Support Center. For more information on FixDist, and
to obtain fixes via the Internet, please reference
http://service.software.ibm.com/aixsupport/
or send electronic mail to "aixserv@austin.ibm.com" with the word "FixDist" in
the "Subject:" line.
V. Acknowledgements
IBM-ERS would like to thank Andrew Pechenov for bringing
this vulnerability to our attention.
AIX is a registered trademark of International Business Machines Corporation.
===============================================================================
[ End IBM-ERS Bulletins ]
CIAC wishes to acknowledge the contributions of IBM-ERS for the
information contained in this bulletin.
CIAC services are available to DOE, DOE Contractors, and the NIH. CIAC
can be contacted at:
Voice: +1 925-422-8193 (7 x 24)
FAX: +1 925-423-8002
STU-III: +1 925-423-2604
E-mail: ciac@ciac.org
World Wide Web: http://www.ciac.org/
Anonymous FTP: ftp.ciac.org
This document was prepared as an account of work sponsored by an
agency of the United States Government. Neither the United States
Government nor the University of California nor any of their
employees, makes any warranty, express or implied, or assumes any
legal liability or responsibility for the accuracy, completeness, or
usefulness of any information, apparatus, product, or process
disclosed, or represents that its use would not infringe privately
owned rights. Reference herein to any specific commercial products,
process, or service by trade name, trademark, manufacturer, or
otherwise, does not necessarily constitute or imply its endorsement,
recommendation or favoring by the United States Government or the
University of California. The views and opinions of authors expressed
herein do not necessarily state or reflect those of the United States
Government or the University of California, and shall not be used for
advertising or product endorsement purposes.
UCRL-MI-119788
[Privacy and Legal Notice]