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

  1. =============================================================================
  2. CA-95:13                         CERT Advisory
  3.                                  October 19, 1995
  4.                    Syslog Vulnerability - A Workaround for Sendmail
  5. -----------------------------------------------------------------------------
  6.  
  7. The CERT Coordination Center has received reports of problems with the
  8. syslog(3) subroutine. To the best of our current knowledge, the problem is
  9. present in virtually all versions of the UNIX Operating System except the
  10. following: 
  11.          
  12.           Sony's NEWS-OS 6.X
  13.           SunOS 5.5 (Solaris 2.5)
  14.           Linux with libc version 4.7.2, released May 1995 
  15.  
  16. We have received reports indicating that the vulnerability is being exploited
  17. with a script that has been written to be used with sendmail.
  18.  
  19. This advisory includes a workaround that you can use with sendmail. It
  20. *does not* include workarounds for any other programs that use the syslog(3)
  21. subroutine--telnetd, ftpd, httpd, etc.
  22.  
  23. The CERT Coordination Center recommends installing all appropriate
  24. syslog-related patches as soon as they are available from vendors. But, in
  25. the meantime, we suggest addressing at least the syslog problem in sendmail by
  26. installing sendmail version 8.7.1. We are aware that several workarounds
  27. concerning the syslog vulnerability have been published on the Internet, but
  28. the CERT staff has not formally evaluated them.
  29.  
  30. As we receive additional information relating to this advisory, we will
  31. place it in
  32.  
  33.         ftp://info.cert.org/pub/cert_advisories/CA-95:13.README
  34.  
  35. We encourage you to check our README files regularly for updates on advisories
  36. that relate to your site.
  37.  
  38. -----------------------------------------------------------------------------
  39.  
  40. I.   Description
  41.  
  42.      The syslog(3) subroutine uses an internal buffer for building messages
  43.      that are sent to the syslogd(8) daemon. This subroutine does no range
  44.      checking on data stored in this buffer. It is possible to overflow the
  45.      internal buffer and rewrite the subroutine call stack. It is then
  46.      possible to execute arbitrary programs. 
  47.  
  48.      This problem is present in virtually all versions of the UNIX
  49.      Operating System except the following:
  50.  
  51.         Sony's NEWS-OS 6.X
  52.         SunOS 5.5 (Solaris 2.5)
  53.         Linux with libc version 4.7.2 released in May, 1995
  54.  
  55.      The sendmail(8) program uses the syslog(3) subroutine, and a script has
  56.      been written and is being used to exploit the vulnerability.
  57.  
  58. II.  Impact
  59.  
  60.      Local and remote users can execute commands. Prior access to the system
  61.      is not needed. Exploitation can lead to root access.
  62.  
  63. III. Solution
  64.  
  65.      We recommend that you do all of A, B, and C.
  66.  
  67.      A. Install syslog patches from your vendor when they become available.
  68.  
  69.         Information we received from vendors as of the date of this advisory
  70.         is attached as Appendix A and reproduced in CA-95:13.README.
  71.         We will update the README file as vendors send updated information.
  72.  
  73.         When you install patches, you will need to recompile/relink any
  74.         programs built on your system that have been compiled without shared
  75.         libraries, that is, compiled statically. Be especially careful of
  76.         programs that contain their own versions of the syslog(3) subroutine.
  77.         You may need to do significant extra work to compile those programs to
  78.         use the vendor-supplied patches.
  79.  
  80.      B. Install sendmail version 8.7.1. 
  81.  
  82.         NOTE: This workaround addresses the syslog(3) vulnerability in 
  83.               sendmail only. The vulnerability still exists in all other
  84.               programs that use syslog(3). 
  85.  
  86.         When your vendor(s) provides a patch, we recommend that you rebuild
  87.         sendmail version 8.7.1 with the patched syslog(3) and place that
  88.         newly compiled version into service. 
  89.         
  90.         Sendmail is available by anonymous FTP from
  91.  
  92.         ftp://info.cert.org/pub/tools/sendmail/
  93.         ftp://ftp.cs.berkeley.edu/ucb/sendmail/
  94.         ftp://ftp.auscert.org.au/pub/mirrors/ftp.cs.berkeley.edu/ucb/sendmail/
  95.         ftp://ftp.cert.dfn.de/pub/tools/net/sendmail/
  96.  
  97.         Checksum:
  98.  
  99.            MD5 (sendmail.8.7.1.tar.Z) = 4a66d07a059d1d5af5e9ea53ff1b396a
  100.  
  101.         Depending upon your currently installed sendmail program, switching to
  102.         a different sendmail may require significant effort (such as rewriting
  103.         the sendmail.cf file). See Section VI for additional notes on
  104.         installation.  
  105.  
  106.         In addition, Sections IV and V below contain scripts for building
  107.         sendmail 8.7.1 for SunOS 4.1.X and Solaris 2.X, respectively. 
  108.  
  109.      C. Install smrsh.
  110.      
  111.         To restrict the sendmail program mailer facility, install and
  112.         use the sendmail restricted shell program (smrsh). We recommend
  113.         that you do this regardless of whether you use the vendor's supplied
  114.         sendmail or you install sendmail version 8.7.1.  
  115.         
  116.         Smrsh is now included in the sendmail 8.7.1 distribution in the 
  117.         subdirectory smrsh. See the RELEASE_NOTES file for a description
  118.         of how to integrate smrsh into your sendmail configuration file.
  119.  
  120. IV. Building this package for SunOS 4.1.X
  121.  
  122.     Here is a script that is given as an illustration of how to build
  123.     sendmail 8.7.1 for SunOS 4.1.X. Please refer to READ_ME in the src
  124.     subdirectory for a more complete explanation of other options available
  125.     during the compilation process. 
  126.  
  127.     % uname -sr
  128.     SunOS 4.1.2
  129.     % ls
  130.     sendmail.8.7.1.tar.Z
  131.     % zcat sendmail.8.7.1.tar.Z | tar xf -
  132.     % cd sendmail-8.7.1/src
  133.     % ./makesendmail LIBS='-lresolv' DBMDEF='-DNDBM -DNIS' \
  134.         INCDIRS= LIBDIRS= sendmail
  135.       Configuration: os=SunOS, rel=4.1.2, rbase=4, arch=sun4, sfx=
  136.       Creating obj.SunOS.4.1.2.sun4 using Makefile.SunOS
  137.       Making dependencies in obj.SunOS.4.1.2.sun4
  138.       Making in obj.SunOS.4.1.2.sun4
  139.       ...
  140.  
  141.     See Section VI for final installation steps.
  142.  
  143. V.  Building this package for Solaris 2.X
  144.  
  145.     Here is a typescript that is given as an illustration for how to build
  146.     sendmail 8.7.1 for Solaris 2.X. Note that this procedure assumes that
  147.     you have the GNU gcc system. The examples below used gcc version 2.6.3.
  148.     Again, please refer to READ_ME in the src sub-directory for a more
  149.     complete explanation of other options available during the compilation
  150.     process.
  151.  
  152.     % uname -sr
  153.     SunOS 5.4
  154.     % ls
  155.     sendmail.8.7.1.tar.Z
  156.     % zcat sendmail.8.7.1.tar.Z | tar xf -
  157.     % cd sendmail-8.7.1/src
  158.     % ./makesendmail LIBS='-lresolv -lsocket -lnsl -lelf' \
  159.         INCDIRS= LIBDIRS= sendmail
  160.       Configuration: os=SunOS, rel=5.4, rbase=5, arch=sun4, sfx=
  161.       Creating obj.SunOS.5.4.sun4 using Makefile.SunOS.5.4
  162.       Making dependencies in obj.SunOS.5.4.sun4
  163.       ...
  164.  
  165.     Note: If you wish sendmail version 8.7.1 to use the aliases and
  166.     configuration file directory conventions from SunOS 5.4, use the
  167.     following command:
  168.  
  169.           ./makesendmail LIBS='-lresolv -lsocket -lnsl -lelf' \
  170.             ENVDEF='-DSOLARIS=204 -DUSE_VENDOR_CF_PATH' INCDIRS= \
  171.             LIBDIRS= sendmail
  172.  
  173. VI. Final Installation Notes
  174.  
  175.     Sendmail can then be installed and configured with new configuration
  176.     files as needed. We strongly recommend that if you change to sendmail
  177.     8.7.1, you also change to the configuration files that are provided with
  178.     that version. 
  179.  
  180.     Significant work has been done to make this task easier. It is now
  181.     possible to build a sendmail configuration file (sendmail.cf) using
  182.     the configuration files provided with this release. Consult the
  183.     cf/READ_ME file for a more complete explanation. We recommended that you
  184.     create your configuration files using this method because it provides a
  185.     technique for incorporating any future changes to sendmail into your
  186.     configuration files. 
  187.  
  188.     In addition, we recommend that you recreate your configuration file
  189.     (sendmail.cf) using the configuration files provided with 8.7.1.
  190.  
  191.     Finally, for Sun users, a paper is available to help you convert your
  192.     sendmail configuration files from the Sun version of sendmail to one that
  193.     works with version 8.7.1. The paper is entitled "Converting Standard Sun
  194.     Config Files to Sendmail Version 8" and was written by Rick McCarty of
  195.     Texas Instruments Inc. It is included in the distribution and is located
  196.     in contrib/converting.sun.configs. 
  197.  
  198. ---------------------------------------------------------------------------
  199. The CERT Coordination Center staff thanks Eric Allman and Wolfgang Ley for
  200. their involvement in the development of this advisory, and thanks Karl
  201. Strickland and Neil Woods for reporting the vulnerability.
  202. ---------------------------------------------------------------------------
  203. If you believe that your system has been compromised, contact the CERT
  204. Coordination Center or your representative in the Forum of Incident
  205. Response and Security Teams (FIRST).
  206.  
  207. If you wish to send sensitive incident or vulnerability information to
  208. CERT staff by electronic mail, we strongly advise that the email be
  209. encrypted.  The CERT Coordination Center can support a shared DES key, PGP
  210. (public key available via anonymous FTP on info.cert.org), or PEM (contact
  211. CERT staff for details).
  212.  
  213. Internet email: cert@cert.org
  214. Telephone: +1 412-268-7090 (24-hour hotline)
  215.            CERT personnel answer 8:30 a.m.-5:00 p.m. EST(GMT-5)/EDT(GMT-4),
  216.            and are on call for emergencies during other hours.
  217. Fax: +1 412-268-6989
  218.  
  219. Postal address:  CERT Coordination Center
  220.                  Software Engineering Institute
  221.                  Carnegie Mellon University
  222.                  Pittsburgh, PA 15213-3890
  223.                  USA
  224.  
  225. CERT advisories and bulletins are posted on the USENET newsgroup
  226. comp.security.announce. If you would like to have future advisories and
  227. bulletins mailed to you or to a mail exploder at your site, please send mail
  228. to cert-advisory-request@cert.org.
  229.  
  230. Past CERT publications, information about FIRST representatives, and other
  231. information related to computer security are available for anonymous  
  232. FTP from info.cert.org. 
  233.  
  234.  
  235. Copyright 1995 Carnegie Mellon University
  236. This material may be reproduced and distributed without permission provided it
  237. is used for noncommercial purposes and the copyright statement is included.
  238.  
  239. CERT is a service mark of Carnegie Mellon University.
  240.  
  241.  
  242. ..............................................................................
  243.  
  244. Appendix A: Vendor Information
  245.  
  246. Current as of October 19, 1995
  247. See CA-95.13.README for updated information.
  248.  
  249. Below is information we have received from vendors concerning the
  250. vulnerability described in this advisory. If you do not see your vendor's
  251. name, please contact the vendor directly for information.
  252.  
  253. In addition to vendor information, note that the freely available Linux with
  254. libc version 4.7.2, released May 1995, is not vulnerable.
  255.  
  256. --------------------
  257. Eric Allman
  258.  
  259. Sendmail version 8.7.1 is not vulnerable.  
  260. This version is available by anonymous FTP from
  261.  
  262.    ftp://info.cert.org/pub/tools/sendmail/
  263.    ftp://ftp.cs.berkeley.edu/ucb/sendmail/
  264.    ftp://ftp.auscert.org.au/pub/mirrors/ftp.cs.berkeley.edu/ucb/sendmail/
  265.    ftp://ftp.cert.dfn.de/pub/tools/net/sendmail/
  266.  
  267.    Checksum:
  268.  
  269.       MD5 (sendmail.8.7.1.tar.Z) = 4a66d07a059d1d5af5e9ea53ff1b396a
  270.  
  271.  
  272. --------------------
  273. Berkeley Software Design, Inc.
  274.  
  275. Users of BSD/OS V2.0 and V2.0.1 by Berkeley Software Design, Inc. should
  276. install patch U201-001 which works for both versions. The patch is available
  277. to all BSDI customers in:  ftp://ftp.bsdi.com/bsdi/patches/ 
  278.  
  279. md5 checksum: 88b3fd8c83a5926589d7b87b55bc4e14 
  280.  
  281. --------------------
  282. Cray Research
  283.  
  284. Information about fixes for the syslog problem can be found in FN #2011,
  285. dated October 10, 1995. Customers should receive this information from 
  286. their Cray Research service representative.
  287.  
  288. For all source installations, your Cray Research service representative can
  289. obtain the fix via the getfix tool.
  290.  
  291. Due to the number of executables which use this library routine, it is not
  292. possible to provide getfix packages for all binary installations. UNICOS
  293. binary update packages 8.0.4.2 and 9.0.1.2 include this mod.
  294.  
  295.  FIX AVAILABILITY
  296.  ----------------
  297.                          Release Level            Fix Package
  298.  Affected Product        Containing Fix           Availability
  299.  ================        ==============           ===========
  300.  UNICOS 8.0             UNICOS 8.0.4.2 *         source only
  301.  UNICOS 8.3             **                       source only
  302.  UNICOS 9.0             UNICOS 9.0.1.2 *         source only
  303.  
  304.  
  305.  * This update is not yet available.
  306.  ** No more updates planned
  307.  
  308. --------------------
  309. Digital Equipment Corporation
  310.  
  311. At the time of writing this document, patches(binary kits) for Digital's
  312. ULTRIX platforms are in final testing and packaging. V4.3 (both VAX and RISC)
  313. thru V4.5.  
  314.  
  315. Similar patches(binary kits) for OSF/1 versions are in progress and testing
  316. is expected to begin the week of October 23, 1995 and then packaged for
  317. Customer distribution estimated to available in November. Digital will provide
  318. notice of the completion of the kits through AES services (DIA, DSNlink
  319. FLASH) and be available from your normal Digital Support channel.
  320.                         Digital's Software Security Response Team    10/18/95
  321.  
  322. --------------------
  323. Open Software Foundation
  324.  
  325. OSF cannot reproduce the security hole in OSF/1. However we have reproduced
  326. the problem with syslog(3).  We have a fix for the syslog(3) problem. Support
  327. customers should contact OSF for the fix. The fix will be included in the
  328. OSF/1 R1.3.2 update release. 
  329.  
  330. --------------------
  331. Silicon Graphics Inc.
  332.  
  333. SGI has been in coordination with CERT regarding this issue.
  334.  
  335. Specific SGI information was not complete before CERTs submission deadline for
  336. this advisory. 
  337.  
  338. SGI does have pending information and this information will be available via
  339. anonymous ftp (sgigate.sgi.com) and/or your SGI service provider and potential
  340. future CERT advisory addendums.
  341.  
  342. --------------------
  343. Solbourne (Grumman)
  344.  
  345. Solbourne 2.5 is not vulnerable.
  346.  
  347. --------------------
  348. Sony Corporation
  349.  
  350. NEWS-OS 6.0.3 and 6.1 are not vulnerable.
  351.  
  352. --------------------
  353. Sun Microsystems, Inc.
  354.  
  355. SunOS 5.5 is not vulnerable.
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.