Technical article 107660

rlogin/term vulnerability is announced in CERT Advisory CA-97.06.

OpenServer 5.0.0OpenServer 5.0.2

Written · Last revised

Problem

The above SCO products are all believed to be affected by the rlogin vulnerability which was announced in the CERT Advisory CA-97.06. Details of CERT Advisory CA-97.06 are listed below.

=====================================================================
CERT(sm) Advisory CA-97.06
Original issue date: February 6, 1997
Last revised: --
Topic: Vulnerability in rlogin/term
---------------------------------------------------------------------

The CERT Coordination Center has received reports of a vulnerability in many implementations of the rlogin program, including eklogin and klogin. By exploiting this vulnerability, users with access to an account on the system can cause a buffer overflow and execute arbitrary programs as root.

The CERT/CC staff recommends installing a vendor patch for this problem (Sec. III.A). Until you can do so, we urge you to turn off rlogin or replace it with a wrapper (see Sec. III.B.2).

We will update this advisory as we receive additional information. Please check advisory files regularly for updates that relate to your site.

---------------------------------------------------------------------
I.   Description

The rlogin program provided by many UNIX systems, as well as some non-UNIX systems, is described in RFC 1282. Here is an excerpt from that RFC that describes its elemental functionality:

"The rlogin facility provides a remote-echoed, locally flow- controlled virtual terminal with proper flushing of output. It is widely used between Unix hosts because it provides transport of more of the Unix terminal environment semantics than does the Telnet protocol, and because on many Unix hosts it can be configured not to require user entry of passwords when connections originate from trusted hosts."

The key point from this description is that the rlogin program passes the terminal type description from the local host to the remote host. This functionality allows terminal-aware programs such as full-screen text editors to operate properly across a computer-to-computer connection created with rlogin.

To do this, the rlogin program uses the current terminal definition as identified by the TERM environment variable. The protocol described in RFC 1282 explains how this terminal information is transferred from the local machine where the rlogin client program is running to the remote machine where service is sought.

Unfortunately, many implementations of the rlogin program contain a defect whereby the value of the TERM environment variable is copied to an internal buffer without due care. The buffer holding the copied value of TERM can be overflowed. In some implementations, the buffer is a local variable, meaning that the subroutine call stack can be overwritten and arbitrary code executed. The executed code is under the control of the user running the rlogin program.

In addition, the rlogin program is set-user-id root. rlogin requires these increased privileges so it can allocate a port in the required range, as described in the in.rlogind (or rlogind) manual page:

"The server checks the client's source port. If the port is not in the range 0-1023, the server aborts the connection."

In summary, rlogin is a set-user-id root program that in many implementations contains a programming defect whereby an internal buffer can be overflowed and arbitrary code can be executed as root.

II.  Impact

Users can become root if they have access to an account on the system.

The Santa Cruz Operation (SCO)
==============================
SCO is investigating this problem and should a patch be necessary,
SCO will provide updated information for this advisory. Patches for
SCO products are listed at https://ftp.scoexpert.com/SLS/README
---------------------------------------------------------------------
The CERT Coordination Center staff thanks AUSCERT and DFN-CERT for
their contributions to the development of this advisory.
---------------------------------------------------------------------

If you believe that your system has been compromised, contact the CERT Coordination Center or your representative in the Forum of Incident Response and Security Teams see ftp://info.cert.org/pub/FIRST/first-contacts

CERT/CC Contact Information
---------------------------
Email    cert@cert.org
Phone    +1 412-268-7090 (24-hour hotline)
      CERT personnel answer 8:30-5:00 p.m. EST(GMT-5) / EDT(GMT-4)
      and are on call for emergencies during other hours.
Fax      +1 412-268-6989

Postal address CERT Coordination Center Software Engineering Institute Carnegie Mellon University Pittsburgh PA 15213-3890 USA

Using encryption:
We strongly urge you to encrypt sensitive information sent by email.
We can support a shared DES key or PGP. Contact the CERT/CC for more
information.
Location of CERT PGP key
ftp://info.cert.org/pub/CERT_PGP.key
Getting security information:
CERT publications and other security information are available from
http://www.cert.org/
ftp://info.cert.org/pub/

CERT advisories and bulletins are also posted on the USENET newsgroup comp.security.announce

To be added to our mailing list for advisories and bulletins, send your email address to

cert-advisory-request@cert.org
In the subject line, type
SUBSCRIBE  your-email-address
---------------------------------------------------------------------
Copyright 1997 Carnegie Mellon University
This material may be reproduced and distributed without permission
provided it is used for non-commercial purposes and the copyright
statement is included.
CERT is a service mark of Carnegie Mellon University.
---------------------------------------------------------------------
This file:
ftp://info.cert.org/pub/cert_advisories/CA-97.06.rlogin-term
http://www.cert.org
click on "CERT Advisories"
NOTE:     SCO UNIX System V/386 Release 3.2 Operating System Version 4.x
          and SCO XENIX 386 Operating System Release 2.3.4 is only vulnerable
          if SCO TCP/IP Release 1.2.x is installed.

Solution

This problem has been reported to SCO Engineering.

From the Xinuos technical article database, record 107660. Reproduced with permission. The original is at www.sco.com/ta/107660, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.