Original issue date: January 22, 1998<BR>
Last revised: March 2, 1998<BR>
Updates section - described two cases in which
the vulnerability is present.<BR>

<P>A complete revision history is at the end of this file.

<P>The text of this advisory was originally released on January 20,
1998, as SNI-23, developed by Secure Networks, Inc. (SNI). To more
widely broadcast this information, we are reprinting the SNI advisory
here with their permission. Some technical details in the original
advisory are not included in this reprint, and these are indicated
thus:

<P>{ DETAILS NOT INCLUDED }

<P>We have also removed SNI's PGP public key block and added our
contact information.

<P>The original advisory is available from
<BR>
<A HREF="ftp://ftp.secnet.com/pub/advisories/SNI-23.SSH-AGENT.advisory">ftp://ftp.secnet.com/pub/advisories/SNI-23.SSH-AGENT.advisory</A>

<P>We will update this advisory as we receive additional information.
   Look for it in an "Updates" section at the end of the advisory.

<P><HR>
This advisory details a vulnerabily in the SSH cryptographic login
program.  The vulnerability enables users to use RSA credentials
belonging to other users who use the ssh-agent program.  This
vulnerability may allow an attacker on the same local host to login
to a remote server as the user utilizing SSH.

<H2>Problem Description:</H2>

In order to avoid forcing users of RSA based authentication to go
through the trouble of retyping their pass phrase every time they wish
to use ssh, slogin, or scp, the SSH package includes a program called
ssh-agent, which manages RSA keys for the SSH program.  The ssh-agent
program creates a mode 700 directory in /tmp, and then creates an
AF_UNIX socket in that directory.  Later, the user runs the ssh-add
program, which adds his private key to the set of keys managed by the
ssh-agent program.  When the user wishes to access a service which
permits him to log in using only his RSA key, the SSH client connects
to the AF_UNIX socket, and asks the ssh-agent program for the key.

<P>Unfortunately, when connecting to the AF_UNIX socket, the SSH client is
running as super-user, and performs insufficient permissions checking.
This makes it possible for users to trick their SSH clients into using
credentials belonging to other users.  The end result is that any user
who utilizes RSA authentication AND uses ssh-agent, is vulnerable.
Attackers can utilize this vulnerability to access remote accounts
belonging to the ssh-agent user.

<P>{ DETAILS NOT INCLUDED }


<H2>Vulnerable Systems:</H2>


This vulnerability effects the Unix versions of SSH ONLY.

<P>SSH for unix versions 1.2.17 through 1.2.21 are vulnerable if installed
with default permissions.  Versions of SSH prior to 1.2.17 are subject to
a similar (but different) attack.

<P>F-Secure SSH for Unix systems prior to release 1.3.3 ARE vulnerable.

<P>You can determine the version of SSH you are running by issuing the case
sensitive command:
<PRE>
% ssh -V
</PRE>

Version 1.1 of the windows-based SSH client sold by Data Fellows Inc.
under the F-Secure brand name is NOT vulnerable to this attack.

<P>Versions 1.0 and 1.0a of Mac SSH are NOT vulnerable to this attack.

<H2>Fix Resolution:</H2>
<H3>Non-commercial users:</H3>

If using the free non-commercial SSH distribution for Unix, administrators
are urged to upgrade to SSH 1.2.22 or later.  Updated versions of the free
unix SSH can be found at ftp://ftp.cs.hut.fi/pub/ssh

<H3>Commercial users:</H3>
F-Secure SSH version 1.3.3 fixes this security problem.  If you are using
the commercial Data Fellows SSH package and you have a support contract,
you can obtain SSH version 1.3.3 from your local retailer.

<P>Users without a support contract can obtain a diff file which fixes
this problem.  This file can be obtained from:
<A HREF="http://www.DataFellows.com/f-secure/support/ssh/bug/su132patch.html">http://www.DataFellows.com/f-secure/support/ssh/bug/su132patch.html</A>

<H2>Workaround:</H2>
As a temporary workaround, administrators may remove the setuid bit from
the SSH binary.  This will prevent the attack from working, but will
disable a form of authentication documented as rhosts-RSA.  For example,
if your SSH binary is in the /usr/local/bin directory, the following
command will remove the setuid bit from the SSH binary:
<PRE>
# chmod u-s /usr/local/bin/ssh
</PRE>

<H2>Additional Information</H2>

SSH is a cryptographic rsh, rlogin, and rcp replacement.  SSH was
written by Tatu Ylonen <A HREF="mailto:ylo@cs.hut.fi">ylo@cs.hut.fi</A>.  For more information about the
noncommercial unix version of SSH, please see http://www.cs.hut.fi/ssh

<P>Commercial versions of ssh are marketed by Data Fellows Inc.  For
information about the F-secure ssh derivatives sold by Data Fellows Inc,
please see <A HREF="http://www.DataFellows.com/f-secure">
http://www.DataFellows.com/f-secure</A>.

<P>This vulnerability was discovered by David Sacerdote <A HREF="mailto:davids@secnet.com">davids@secnet.com</A>.

<P>{ DETAILS NOT INCLUDED }
<H2>Copyright Notice</H2>
The contents of this advisory are Copyright (C) 1997 Secure Networks
Inc, and may be distributed freely provided that no fee is charged for
distribution, and that proper credit is given.

<P>You can find Secure Networks papers at <A HREF="ftp://ftp.secnet.com/pub/papers">ftp://ftp.secnet.com/pub/papers</A>
 and advisories at <A HREF="ftp://ftp.secnet.com/advisories"> ftp://ftp.secnet.com/advisories</A>

<P>You can browse our web site at <A HREF="http://www.secnet.com">http://www.secnet.com</A>

<P>You can subscribe to our security advisory mailing list by sending mail
 to <A HREF="mailto:majordomo@secnet.com">majordomo@secnet.com</A> with the line "subscribe sni-advisories"


<P><HR>

The CERT Coordination Center thanks Secure Networks, Inc. for permission to
reproduce technical content from their advisory SNI-23, which is copyrighted
1997 Secure Networks, Inc.

<p><!--#include virtual="/include/footer_nocopyright.html" --> </p>

<p>Copyright 1998 Carnegie Mellon University.</p>



<HR>

Revision History
<PRE>
Mar 02, 1998  Updates section -  described two cases in which the
              vulnerability is present.
</PRE>