home *** CD-ROM | disk | FTP | other *** search
/ Hacks & Cracks / Hacks_and_Cracks.iso / hackersclub / km / library / hack / ca-97_23.txt < prev    next >
PGP Signed Message  |  1998-03-25  |  15KB  |  412 lines

  1. -----BEGIN PGP SIGNED MESSAGE-----
  2.  
  3. =============================================================================
  4. CERT* Advisory CA-97.23
  5. Original issue date: September 16, 1997
  6.  
  7. Last revised: September 19, 1997 
  8.               Appendix A - Added information for OpenBSD and 
  9.               Silicon Graphics, Inc.
  10.  
  11.               A complete revision history is at the end of this file.
  12.  
  13. Topic: Buffer Overflow Problem in rdist
  14. - -----------------------------------------------------------------------------
  15.  
  16. The CERT Coordination Center has received reports of a vulnerability in rdist
  17. that enables anyone with access to a local account to gain root privileges.
  18. This is not the same vulnerability as the one discussed in CA-96.14.
  19.  
  20. Section III.A contains instructions on how to determine if your site is
  21. vulnerable. If your implementation of rdist is vulnerable, the CERT/CC team
  22. encourages you to follow your vendor's instructions (Sec. III.B and Appendix
  23. A) or install a freely available version of the rdist program that is not
  24. installed as set-user-id root and is, therefore, not susceptible to the
  25. exploitation described in this advisory (Sec. III.C).
  26.  
  27. For information on the earlier problem with rdist, see
  28.       ftp://info.cert.org/pub/cert_advisories/CA-96.14.rdist_vul
  29.  
  30. We will update this advisory as we receive additional information.
  31. Please check our advisory files regularly for updates that relate to your
  32. site.
  33.  
  34. - -----------------------------------------------------------------------------
  35.  
  36. I.   Description
  37.  
  38.      The rdist program is a UNIX Operating System utility used to
  39.      distribute files from one host to another. On some systems, rdist
  40.      opens network connections using a privileged port as the source port.
  41.      This requires root privileges, and to attain these privileges rdist on
  42.      such systems is installed set-user-id root.
  43.  
  44.      A new vulnerability has been found in some set-user-id root
  45.      implementations of rdist. The vulnerability lies in the function
  46.      expstr(), where macros supplied as arguments are expanded using
  47.      sprintf(). It is possible to overwrite stack frames and call specially
  48.      pre-crafted native machine code. If the appropriate machine code is
  49.      supplied, an attacker can execute arbitrary programs (such as the
  50.      shell) with set-user-id root privileges.
  51.  
  52.      Note that this vulnerability is distinct from that discussed in CERT
  53.      advisory CA-96.14.
  54.  
  55.  
  56. II.  Impact
  57.  
  58.      On systems with a vulnerable copy of rdist, anyone with access to a
  59.      local account can gain root access.
  60.  
  61.  
  62. III. Solution
  63.  
  64.      We urge you to follow the steps in Section A to determine if your
  65.      system is vulnerable and, if it is, to turn off rdist while you decide
  66.      how to proceed.
  67.  
  68.      If your system is vulnerable and you need the functionality that rdist
  69.      provides, you should install a vendor patch (Section B). Until you can
  70.      do so, you may want to use a freely available version of rdist that
  71.      does not need to be installed as set-user-id root and is, therefore,
  72.      not susceptible to the exploitation described in this advisory
  73.      (Section C).
  74.  
  75.      A. How to check for set-user-id root versions of rdist
  76.  
  77.         To find set-user-id root versions of rdist and to disable the
  78.         programs that are possibly vulnerable, use the following find
  79.         command or a variant. Consult your local system documentation to
  80.         determine how to tailor the find program on your system.
  81.  
  82.         You will need to run the find command on each system you maintain
  83.         because the command examines files on the local disk only.
  84.         Substitute the names of your local file systems for
  85.         FILE_SYSTEM_NAMES in the example. Example local file system names
  86.         are /, /usr, and /var. You must do this as root.
  87.  
  88.         Note that this is one long command, though we have separated
  89.         it onto three lines using backslashes.
  90.  
  91.              find FILE_SYSTEM_NAMES -xdev -type f -user root \
  92.                     -name '*rdist*' -perm -04000 -exec ls -l '{}' \; \
  93.                     -ok chmod 0500 '{}' \;
  94.  
  95.         This command will find all files on a system that
  96.             - are only in the file system you name (FILE_SYSTEM_NAMES -xdev)
  97.             - are regular files (-type f)
  98.             - are owned by root (-user root)
  99.             - have "rdist" as a component of the name (-name '*rdist*')
  100.             - are setuid (-perm -04000)
  101.  
  102.         Once found, those files will
  103.             - have their names and details printed (-exec ls -l '{}')
  104.             - have the setuid mode removed (making the file available
  105.               only to root) but only if you type `y' in response to the
  106.               prompt (-ok chmod 0500 '{}' \;)
  107.  
  108.      B. Obtain and install the appropriate patch
  109.  
  110.         Below is a list of vendors who have provided information for this
  111.         advisory. Details are in Appendix A, and we will update the appendix
  112.         as we receive more information.
  113.  
  114.                Berkeley Software Design, Inc. (BSDI)
  115.                Digital Equipment Corp.
  116.                FreeBSD, Inc.
  117.                Hewlett-Packard Company
  118.                IBM Corporation
  119.                NEC Corporation
  120.                The Santa Cruz Operation, Inc. (SCO)
  121.                Siemens-Nixdorf
  122.                Silicon Graphics Inc. (SGI)
  123.                Sun Microsystems, Inc.
  124.  
  125.         If your vendor's name is not on this list, please contact the
  126.         vendor directly.
  127.  
  128.      C. If you need the functionality that rdist provides but a patched
  129.         version is not yet available from your vendor, consider installing
  130.         rdist-6.1.3, which is freely available from
  131.  
  132.               ftp://usc.edu/pub/rdist/rdist-6.1.3.tar.gz
  133.  
  134.               MD5 (rdist-6.1.3.tar.gz) = 8a76b880b023c5e648b7cb77b9608b9f
  135.  
  136.         The README file in the distribution explains how to configure and
  137.         install this version of rdist.
  138.  
  139.         We recommend that you configure this version of rdist to use rsh
  140.         instead of rcmd. Here is the relevant text from the README:
  141.  
  142.             By default rdist uses rsh(1c) to make connections to remote
  143.             hosts. This has the advantage that rdist does not need to be
  144.             setuid to "root". This eliminates most potential security
  145.             holes. It has the disadvantage that it takes slightly more time
  146.             for rdist to connect to a remote host due to the added overhead
  147.             of doing a fork() and then running the rsh(1c) command.
  148.  
  149.         Some sites with sufficient expertise use the ssh program in
  150.         conjunction with rdist, instead of using rcmd or rsh. If you have
  151.         the expertise, you may want to implement this configuration.
  152.  
  153.         For further details on this option see "Ssh (Secure Shell) FAQ -
  154.         Frequently asked questions," Section 4.4, "Can I use rdist with ssh?"
  155.         It is available from
  156.  
  157.                 http://www.uni-karlsruhe.de/~ig25/ssh-faq/ssh-faq-4.html
  158.  
  159.         For details on how to obtain ssh, see FAQ Section 3.4, "Where can I
  160.         obtain ssh?" This section can be found in
  161.  
  162.             http://www.uni-karlsruhe.de/~ig25/ssh-faq/ssh-faq-3.html
  163.  
  164.  
  165. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  166.  
  167. Appendix A - Vendor Information
  168.  
  169. Below is a list of the vendors who have provided information for this
  170. advisory. We will update this appendix as we receive additional information.
  171. If you do not see your vendor's name, the CERT/CC did not hear from that
  172. vendor. Please contact the vendor directly.
  173.  
  174.  
  175. Berkeley Software Design, Inc. (BSDI)
  176. =====================================
  177.   BSDI shipped a patch for this for our 2.1 release (U210-018) when
  178.   the original Bugtraq advisory was released.  The 3.0 version of
  179.   rdist is not vulnerable and in fact is no longer even setuid.
  180.  
  181.  
  182. Digital Equipment Corp.
  183. =======================
  184.   This reported problem is not present for Digital's ULTRIX or Digital UNIX
  185.   Operating Systems Software.
  186.  
  187.                                 DIGITAL EQUIPMENT CORPORATION
  188.                                 -----------------------------
  189.  
  190. FreeBSD, Inc.
  191. =============
  192.   2.1.0 is vulnerable.
  193.   2.1.5, 2.1.6 and 2.1.7 are and 2.1-stable are not. In any case, upgrading
  194.   to 2.1.7 or even better, 2.1-stable should be considered.
  195.   If there is demand, we'll release a patch for 2.1.0
  196.  
  197.   All 2.2 releases, 2.2-stable and FreeBSD-current are not vulnerable.
  198.  
  199.  
  200. Hewlett-Packard Company
  201. =======================
  202.   HP is -not- vulnerable; the problem didn't exist in 9.X, and has been fixed
  203.   in 10.X with Security Bulletin #36 (HPSBUX9608-036) last year.  Patch
  204.   numbers change frequently because of cumulative patching, so please check
  205.   current patch ID information either by bulletin or by platform/release at
  206.   our HP Electronic Support Center in the "Security Patch Matrix," which is
  207.   updated every 24 hours.
  208.  
  209.  1)  From your Web browser, access the URL:
  210.  
  211.        http://us-support.external.hp.com (US,Canada,Asia-Pacific,
  212.        and Latin-America)
  213.  
  214.        http://europe-support.external.hp.com  (Europe)
  215.  
  216.  2)  On the HP Electronic Support Center main screen, select the
  217.      hyperlink "Support Information Digests".
  218.  
  219.  
  220.  3)  On the "Welcome to HP's Support Information Digests" screen,
  221.      under the heading "Register Now", select the appropriate hyperlink
  222.      "Americas and Asia-Pacific", or "Europe".
  223.  
  224.  4)  On the "New User Registration" screen, fill in the fields
  225.      for the User Information and Password and then select the button
  226.      labeled "Submit New User".
  227.  
  228.  5)  On the "User ID Assigned" screen, select the hyperlink
  229.      "Support Information Digests".
  230.  
  231.   **Note what your assigned user ID and password are for future
  232.   reference.
  233.  
  234.  6)  You should now be on the "HP Support Information Digests Main"
  235.      screen.  You might want to verify that your email address is
  236.      correct as displayed on the screen.  From this screen, you may
  237.      also view/subscribe to the digests, including the security
  238.      bulletins digest.
  239.  
  240.      To get a patch matrix of current HP-UX and BLS security
  241.      patches referenced by either Security Bulletin or Platform/OS,
  242.      click on following screens in order:
  243.         Technical Knowledge Database
  244.         Browse the HP Security Bulletins Archive
  245.         HP-UX Security Patch Matrix
  246.  
  247.  
  248. IBM Corporation
  249. ===============
  250.   All versions of AIX are vulnerable to this buffer overflow.  There is
  251.   no 3.2 fix.  It is recommended that 3.2 customers upgrade to a higher
  252.   level.  The following APARs will be available for AIX version 4
  253.   soon.
  254.  
  255.   AIX 3.2:  upgrade to 4.1.5 or higher
  256.   AIX 4.1:  IX70876
  257.   AIX 4.2:  IX70875
  258.  
  259.    To Order
  260.   --------
  261.     APARs may be ordered using Electronic Fix Distribution (via FixDist)
  262.     or from the IBM Support Center.  For more information on FixDist,
  263.     reference URL:
  264.  
  265.        http://service.software.ibm.com/aixsupport/
  266.  
  267.     or send e-mail to aixserv@austin.ibm.com with a subject of "FixDist".
  268.  
  269.   IBM and AIX are registered trademarks of International Business Machines
  270.   Corporation.
  271.  
  272.  
  273. NEC Corporation
  274. ===============
  275.   The following systems are NOT affected by this vulnerability:
  276.  
  277.         UX/4800
  278.         UX/4800(64)
  279.         EWS-UX/V(Rel4.2MP)
  280.         EWS-UX/V(Rel4.2)
  281.         UP-UX/V(Rel4.2MP)
  282.  
  283.   To report a new vulnerability, contact <UX48-security-support@nec.co.jp>.
  284.  
  285. OpenBSD
  286. =======
  287.  
  288.   OpenBSD does not have this problem.  None of the versions of rdist
  289.   distributed are setuid or setgid.
  290.  
  291.  
  292. The Santa Cruz Operation, Inc. (SCO)
  293. ====================================
  294.   SCO has determined that the following SCO operating systems are
  295.   not vulnerable:
  296.  
  297.   - SCO CMW+ 3.0
  298.   - SCO Open Desktop/Open Server 3.0
  299.   - SCO OpenServer 5.0
  300.   - SCO UnixWare 2.1
  301.  
  302.  
  303. Siemens-Nixdorf Informationssysteme AG
  304. ======================================
  305.   Siemens-Nixdorf does not ship rdist.
  306.  
  307.  
  308. Silicon Graphics Inc. (SGI)
  309. ===========================
  310.  
  311. Silicon Graphics Inc. issued Security Advisory, "IRIX ordist
  312. Buffer Overrun Vulnerability," 19970509-02-PX, August 5, 1997.
  313.  
  314. Patches are available via anonymous FTP and your service/support provider.  
  315.  
  316. The SGI anonymous FTP site is sgigate.sgi.com (204.94.209.1) or its
  317. mirror, ftp.sgi.com.   Security information and patches can be found
  318. in the ~ftp/security and ~ftp/patches directories, respectfully.
  319.  
  320. For subscribing to the wiretap mailing list and other SGI security related
  321. information, please refer to the Silicon Graphics Security Headquarters
  322. website located at:
  323.  
  324.              http://www.sgi.com/Support/security/security.html
  325.  
  326.  
  327. Sun Microsystems, Inc.
  328. ======================
  329.   We are producing patches.
  330.  
  331. - -----------------------------------------------------------------------------
  332.  
  333. The CERT Coordination Center thanks Hiroshi Nakano of Ryukoku University,
  334. Japan for reporting this problem. We also thank Wolfgang Ley of DFN-CERT
  335. for his assistance with the Solutions section of the advisory.
  336.  
  337. - -----------------------------------------------------------------------------
  338.  
  339. If you believe that your system has been compromised, contact the CERT
  340. Coordination Center or your representative in the Forum of Incident Response
  341. and Security Teams (see http://www.first.org/team-info/).
  342.  
  343.  
  344. CERT/CC Contact Information
  345. - ----------------------------
  346. Email    cert@cert.org
  347.  
  348. Phone    +1 412-268-7090 (24-hour hotline)
  349.                 CERT personnel answer 8:30-5:00 p.m. EST(GMT-5) / EDT(GMT-4)
  350.                 and are on call for emergencies during other hours.
  351.  
  352. Fax      +1 412-268-6989
  353.  
  354. Postal address
  355.          CERT Coordination Center
  356.          Software Engineering Institute
  357.          Carnegie Mellon University
  358.          Pittsburgh PA 15213-3890
  359.          USA
  360.  
  361. Using encryption
  362.    We strongly urge you to encrypt sensitive information sent by email. We can
  363.    support a shared DES key or PGP. Contact the CERT/CC for more information.
  364.    Location of CERT PGP key
  365.          ftp://info.cert.org/pub/CERT_PGP.key
  366.  
  367. Getting security information
  368.    CERT publications and other security information are available from
  369.         http://www.cert.org/
  370.         ftp://info.cert.org/pub/
  371.  
  372.    CERT advisories and bulletins are also posted on the USENET newsgroup
  373.         comp.security.announce
  374.  
  375.    To be added to our mailing list for advisories and bulletins, send
  376.    email to
  377.         cert-advisory-request@cert.org
  378.    In the subject line, type
  379.         SUBSCRIBE  your-email-address
  380.  
  381. - ---------------------------------------------------------------------------
  382. Copyright 1997 Carnegie Mellon University. Conditions for use, disclaimers,
  383. and sponsorship information can be found in
  384. http://www.cert.org/legal_stuff.html and ftp://info.cert.org/pub/legal_stuff .
  385. If you do not have FTP or web access, send mail to cert@cert.org with
  386. "copyright" in the subject line.
  387.  
  388. *CERT is registered in the U.S. Patent and Trademark Office.
  389.  
  390. - ---------------------------------------------------------------------------
  391.  
  392. This file: ftp://info.cert.org/pub/cert_advisories/CA-97.23.rdist
  393.            http://www.cert.org
  394.                click on "CERT Advisories"
  395.  
  396.  
  397. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  398. Revision history
  399.  
  400. Sept. 15, 1997 - Appendix A - added information for OpenBSD and
  401.                  Silicon Graphics, Inc.
  402.  
  403. -----BEGIN PGP SIGNATURE-----
  404. Version: 2.6.2
  405.  
  406. iQCVAwUBNCK8EnVP+x0t4w7BAQHlOAQApwzrHvv0g8Cp4zH/KjduVJtEsFBxVa6Z
  407. umUXZLPvVK53GzHozFsEubwC8WG++pG9jdv24xcsRt6PYqu0hLk9lJurVRrPzqkw
  408. xTExe4iePnsTaCUN3V71kipcw9oWMkmbQys/QcfnMm2NkFd8OJSxzFdeGoCrqNgu
  409. X4hbOsk/4yw=
  410. =Lyta
  411. -----END PGP SIGNATURE-----
  412.