home *** CD-ROM | disk | FTP | other *** search
/ The Unsorted BBS Collection / thegreatunsorted.tar / thegreatunsorted / hacking / unixhack / loadmod.doc / text0000.txt < prev   
Encoding:
Text File  |  2001-02-10  |  6.4 KB  |  160 lines

  1. =============================================================================
  2. CA-95:12                         CERT Advisory
  3.                                  October 18, 1995
  4.                      Sun 4.1.X Loadmodule Vulnerability 
  5. -----------------------------------------------------------------------------
  6.  
  7. The CERT Coordination Center has received reports of problems with the
  8. loadmodule(8) program. An exploitation script is available and has been used
  9. by local users to gain root privileges.
  10.  
  11. The problem is present in SunOS 4.1.X only, and there is a patch available for
  12. sun4 architectures.
  13.  
  14. The CERT staff recommends that you install the appropriate patch as soon as
  15. possible and take the steps in Section III.B. to further protect your system.
  16.  
  17. As we receive additional information relating to this advisory, we will
  18. place it in
  19.  
  20.         ftp://info.cert.org/pub/cert_advisories/CA-95:12.README
  21.  
  22. We encourage you to check our README files regularly for updates on
  23. advisories that relate to your site.
  24.  
  25. -----------------------------------------------------------------------------
  26.  
  27. I.   Description
  28.  
  29.      The loadmodule(8) program is used by the xnews(1) window system server to
  30.      load two dynamically loadable kernel drivers into the currently running
  31.      system and to create special devices in the /dev directory to use those
  32.      modules. These modules and special files are used to provide a SunView
  33.      binary compatibility mode while running the X11/NeWS windowing system.
  34.      Because of the way the loadmodule(8) program sanitizes its environment,
  35.      unauthorized users can gain root access on the local machine. A script is
  36.      publicly available and has been used to exploit this vulnerability.
  37.  
  38.      This problem is present in SunOS 4.1.X only.
  39.  
  40. II.  Impact
  41.  
  42.      Local users can gain root privileges.
  43.  
  44. III. Solution
  45.  
  46.      The CERT staff recommends that you take the steps described in both A and
  47.      B below. 
  48.  
  49.      A. Obtain and install the appropriate patches according to the
  50.         instructions included with the patches. Patches are available through
  51.         your local Sun Answer Center and by FTP from
  52.  
  53.              ftp://sunsolve1.sun.com/pub/patches/100448-03.tar.Z 
  54.  
  55.         Module           Patch ID        Filename
  56.         ----------       ---------       ---------------
  57.         loadmodule       100448-03       100448-03.tar.Z
  58.  
  59.         Checksum:
  60.             MD5 (100448-03.tar.Z) = 183a22f0a2f6020f1389b6aeea5ca6c6
  61.  
  62.      B. Because, in general, a set-user-id program can lead to security
  63.         exposures, you should also do at least step 1 below. We recommend
  64.         doing steps 2 and 3 as well.
  65.  
  66.         The intent of these directions is make the loadmodule(8) program
  67.         work only for the super-user (currently it works for all users because
  68.         it is set-user-id) and to execute it each time the system boots. By
  69.         following these directions, users who require SunView binary
  70.         compatibility will have it available to them.  
  71.  
  72.         1. If you do not need SunView binary compatibility, then as root,
  73.            turn off setuid root on the loadmodule(8) program with
  74.  
  75.                 # /bin/chmod u-s /usr/openwin/bin/loadmodule
  76.  
  77.         2. If your users need SunView binary compatibility, you can
  78.            enable it immediately--that is without having to reboot
  79.            your system--with the following script.
  80.  
  81.         ------------------------cut here--8<------------------------
  82.         ARCH=`/bin/arch -k`
  83.         OBJ=/sys/${ARCH}/OBJ
  84.         LM=/usr/openwin/bin/loadmodule
  85.         /bin/chmod u-s $LM
  86.         if [ -f $OBJ/evqmod-${ARCH}.o ]; then
  87.           if /usr/etc/modstat | /bin/egrep -s evqmod ; then
  88.             echo evq: already loaded
  89.           elif $LM evqmod-${ARCH}.o evqload; then
  90.             echo evq: loaded
  91.           else
  92.             echo evq: unable to load module
  93.           fi
  94.         fi
  95.         if [ -f $OBJ/winlock-${ARCH}.o ]; then
  96.           if /usr/etc/modstat | /bin/egrep -s winlock ; then
  97.             echo winlock: already loaded
  98.           elif $LM winlock-${ARCH}.o winlockload; then
  99.             echo winlock: loaded
  100.           else
  101.             echo winlock: unable to load module
  102.           fi
  103.         fi
  104.         ------------------------cut here--8<------------------------
  105.  
  106.         As a suggestion, store this script in /tmp/esbc and then
  107.         execute it as root with:
  108.  
  109.                 # sh /tmp/esbc
  110.  
  111.      3. If you've done step 2 above, the module loadings will disappear
  112.         the next time you reboot your system. To make them permanent--
  113.         that is to make these module loadings occur each time your system
  114.         is rebooted--add the script to the end of your /etc/rc.local file.
  115.         
  116. ---------------------------------------------------------------------------
  117. The CERT Coordination Center staff thanks Wolfgang Ley and Sun Microsystems
  118. for their support in the development of this advisory.
  119. ---------------------------------------------------------------------------
  120.  
  121. If you believe that your system has been compromised, contact the CERT
  122. Coordination Center or your representative in the Forum of Incident
  123. Response and Security Teams (FIRST).
  124.  
  125. If you wish to send sensitive incident or vulnerability information to
  126. CERT staff by electronic mail, we strongly advise that the email be
  127. encrypted.  The CERT Coordination Center can support a shared DES key, PGP
  128. (public key available via anonymous FTP on info.cert.org), or PEM (contact
  129. CERT staff for details).
  130.  
  131. Internet email: cert@cert.org
  132. Telephone: +1 412-268-7090 (24-hour hotline)
  133.            CERT personnel answer 8:30 a.m.-5:00 p.m. EST(GMT-5)/EDT(GMT-4),
  134.            and are on call for emergencies during other hours.
  135. Fax: +1 412-268-6989
  136.  
  137. Postal address:  CERT Coordination Center
  138.                  Software Engineering Institute
  139.                  Carnegie Mellon University
  140.                  Pittsburgh, PA 15213-3890
  141.                  USA
  142.  
  143. CERT advisories and bulletins are posted on the USENET newsgroup
  144. comp.security.announce. If you would like to have future advisories and
  145. bulletins mailed to you or to a mail exploder at your site, please send mail
  146. to cert-advisory-request@cert.org.
  147.  
  148. Past CERT publications, information about FIRST representatives, and
  149. other information related to computer security are available for anonymous
  150. FTP from info.cert.org. 
  151.  
  152.  
  153. Copyright 1995 Carnegie Mellon University
  154. This material may be reproduced and distributed without permission provided it
  155. is used for non-commercial purposes and the copyright statement is included.
  156.  
  157. CERT is a service mark of Carnegie Mellon University.
  158.  
  159.  
  160.