Subject Vulnerability in IBM and Linux /bin/login Date 24-May-94
44057d77afbf0c8b594a8c11c597de438329f32351ccf4c92b16e72002e1a5ee
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
===============================================================================
>> CERT-NL, 01-Mar-2000 <<
>> All CERT-NL information has been moved to http://cert.surfnet.nl. Links <<
>> to CERT-NL information contained in this advisory are therefore outdated. <<
>> <<
>> CERT-NL also has stopped the CERT-CC-Mirror service. Due to this the <<
>> links to the CERT-CC mirror are obsolete. Visit the CERT-CC site for the <<
>> complete CERT-CC advisory texts: http://www.cert.org <<
===============================================================================
===============================================================================
Security Advisory CERT-NL
===============================================================================
Author/Source : CERT-NL (Rene Ritzen) Index : S-94-15
Distribution : World Page : 1
Classification: External Version: Final
Subject : Vulnerability in IBM and Linux /bin/login Date : 24-May-94
===============================================================================
CERT-NL received information on a vulnerabilty in IBM AIX and Linux.
CERT-NL wishes to thank NASIRC for providing this information.
- ----------------------------------------------------------------------------
CERT-NL recently received information about a security vulnerability
in /bin/login on machines running the AIX or LINUX operating systems.
NOTE -- The commands necessary to exploit these vulnerabilities have
already been posted to several Usenet newsgroups; CERT-NL recommends
that the fix(es) described below be applied immediately.
SYSTEMS AFFECTED:
All machines running AIX version 3.2.X or any version of the LINUX
operating system.
At the time of this writing, ARPA/CERT has received feedback from the
following vendors indicating that their products are NOT vulnerable:
Amdahl; Apple; BSD; BSDI; Harris; H-P; Motorola; NeXT; Pyramid; SCO;
SGI; Solbourne; Sony; and Sun. In addition, ARPA/CERT has verified
that the product "Free BSD" is NOT vulnerable.
THE PROBLEM:
According to several Usenet postings, any user can gain a root shell
on AIX and LINUX systems by issuing the command "tprof -x /bin/sh".
Additionally, non-privileged users on the system can gain root access
by using the "-f" option in login (if login is setuid root) if they
type "-froot" instead of their username at the login prompt. Lastly,
remote users can gain root access through rlogin by using the "-l"
and "-f" options with the command "rlogin n.n.n.n -l -froot".
THE FIX:
For AIX v3.2.X:
---------------
Until IBM's official long-term fix becomes available (see below), we
recommend you do the following to disable the rlogin daemon:
1) As root, edit /etc/inetd.conf and comment out the line
"login ... rlogin"
2) Run "inetimp"
3) Run "refresh -s inetd"
IBM has issued an emergency fix for the different levels of AIX 3.X
affected by the vulnerability; it is available via anonymous FTP as
follows:
ftp://ftp.nic.surfnet.nl/surfnet/net-security/cert-nl/patches/ibm-fixes/rlogin.tar.Z.
The checksum information for rlogin.tar.z is as follows:
BSD System V MD5
--------- --------- --------------------------------
25285 317 13021 633 803ee38c2e3b8c8c575e2ff5e921034c
IBM's long-term fix (still under development) can be ordered as APAR
IX44254. To order an APAR from IBM contact your local IBM
representative and ask them to ship it as soon as it is available.
According to IBM, this fix will be available in approximately two weeks.
As a possible alternative to completely disabling the rlogin daemon,
NASIRC has developed a workaround that will instead disable only the
"-f" flag:
1) Move /bin/login to a new name (e.g., /bin/login_hides_here)
and remove the set-uid bit.
2) Compile the following program and install it as /bin/login with
set-uid on:
main(argc, argv)
unsigned
argc;
char *argv[];
{
register char
**ap;
for (ap = argv; *ap; ap++)
if (strncmp(*ap, "-f", 2) == 0) {
*ap = (char *)0;
}
execv("/bin/login_hides_here", argv);
}
For LINUX:
----------
A patch for the REMOTE access vulnerability, comprised of the files
"security.tgz" and "README.security", is available via anon FTP from
ftp.nic.surfnet.nl as follows:
ftp://ftp.nic.surfnet.nl/surfnet/net-security/cert-nl/patches/linux-fixes/*
The checksum information is as follows:
BSD System V MD5
--------- --------- --------------------------------
security.tgz 32878 257 40797 513 dd4585cf4da1b52d25d619bf45f55b75
README.security 09575 1 20945 1 41d14d7b8725c7a1015adeb49601619b
NOTE: "security.tgz" includes other security fixes in addition to the
/bin/login patch.
To fix the LOCAL access problem, CERT-NL encourages installation of a
version of /bin/login that does not allow the "-f" option in the form
of "-f<user>". The recommended version should only allow this option
in the form "-f <user>", with a space to indicate two arguments.
If you find a version of Linux that contains the local access vulner-
ability, please contact CERT-NL should you require assistance.
CERT-NL will continue to monitor this situation and will post additional
information should it become necessary. If you have any questions about
this bulletin, please contact CERT-NL via any of the venues below.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
CERT-NL ACKNOWLEDGES: Axel Clauberg and Claus Kalle of the University of
Cologne and Gerhard Rentschler of Stuttgart University for the initial
reporting of this vulnerability to the Internet community. CERT-NL also
acknowledges the ARPA/CERT for their rapid liaison with the vendor com-
munity to identify the vulnerabilities in other forms of UNIX.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
==============================================================================
CERT-NL is the Computer Emergency Response Team for SURFnet customers. SURFnet
is the Dutch network for educational, research and related institutes. CERT-NL
is a member of the Forum of Incident Response and Security Teams (FIRST).
All CERT-NL material is available under:
http://cert.surfnet.nl/
In case of computer or network security problems please contact your local
CERT/security-team or CERT-NL (if your institute is NOT a SURFnet customer
please address the appropriate (local) CERT/security-team).
CERT-NL is one/two hour(s) ahead of UTC (GMT) in winter/summer,
i.e. UTC+0100 in winter and UTC+0200 in summer (DST).
Email: cert-nl@surfnet.nl ATTENDED REGULARLY ALL DAYS
Phone: +31 302 305 305 BUSINESS HOURS ONLY
Fax: +31 302 305 329 BUSINESS HOURS ONLY
Snailmail: SURFnet bv
Attn. CERT-NL
P.O. Box 19035
NL - 3501 DA UTRECHT
The Netherlands
NOODGEVALLEN: 06 22 92 35 64 ALTIJD BEREIKBAAR
EMERGENCIES : +31 6 22 92 35 64 ATTENDED AT ALL TIMES
CERT-NL'S EMERGENCY PHONENUMBER IS ONLY TO BE USED IN CASE OF EMERGENCIES:
THE SURFNET HELPDESK OPERATING THE EMERGENCY NUMBER HAS A *FIXED*
PROCEDURE FOR DEALING WITH YOUR ALERT AND WILL IN REGULAR CASES RELAY IT
TO CERT-NL IN AN APPROPRIATE MANNER. CERT-NL WILL THEN CONTACT YOU.
===============================================================================
-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.1i
iQA/AwUBOL6WFTSYjBqwfc9jEQK5FwCfW9WuH/OCkLFcQFUfysEqmso/gt0AmwcB
65/PPCb6kK50E+Rw1XKZ/kDk
=ks+O
-----END PGP SIGNATURE-----