home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / general / cert0109.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  20.7 KB  |  528 lines

  1.  
  2. -----BEGIN PGP SIGNED MESSAGE-----
  3.  
  4. =============================================================================
  5. CERT(sm) Advisory CA-96.04
  6. Original issue date: February 22, 1996
  7. Last revised:  June 4, 1997
  8.                Updated the URL pointing to the current version of BIND.
  9.  
  10.                A complete revision history is at the end of this file.
  11.  
  12. Topic: Corrupt Information from Network Servers
  13. - -----------------------------------------------------------------------------
  14.  
  15. The CERT Coordination Center has received reports of intruders exploiting
  16. systems by corrupting data provided by a Domain Name Service (DNS) server.
  17. Although these reports have focused only on DNS, this vulnerability could
  18. apply to any network service from which data is received and subsequently
  19. used.
  20.  
  21. Section III.A contains a pointer to two subroutines that address the DNS
  22. problem. These subroutines, written in the C programming language, can be used
  23. to validate host names and IP addresses according to RFCs 952 and 1123, as
  24. well as names containing characters drawn from common practice, namely "_" and
  25. "/".
  26.  
  27. In the specific case of sendmail, the problem has already been addressed by
  28. patches (see Section III.B).
  29.  
  30. The CERT staff has received information that the next minor release of BIND
  31. nameserver will be enforcing RFC952 (as modified by RFC1123) hostname
  32. conformance as part of its SECURITY measures. Following The BIND release,
  33. hostnames that fail to conform to these rules will be unreachable from
  34. sites running these servers.
  35.  
  36. Hostnames (A records) are restricted to the following characters only:
  37.  
  38.             "A" - "Z", "a" - "z", "0" - "9", "." and "-"
  39.  
  40. These characters are specifically excluded:  "_" and "/".
  41.  
  42. For a full description of what is allowed in a hostname, please
  43. refer to RFC952 and RFC1123, available from http://ds.internic.net/ds/
  44.  
  45.         RFC952: DOD INTERNET HOST TABLE SPECIFICATION, October 1985
  46.         RFC1123: Requirements for Internet Hosts -- Application and
  47.                         Support, October 1989
  48.  
  49. The latest release of Bind is available from:
  50.  
  51.         ftp://ftp.isc.org/isc/bind/src/
  52.  
  53. Please see the README file in that directory for more information.
  54.  
  55. This information is also included in the latest software versions
  56. directory:
  57.  
  58.          ftp://info.cert.org/pub/latest_sw_versions/bind
  59.  
  60. - -----------------------------------------------------------------------------
  61.  
  62. I.   Description
  63.  
  64.      Information provided by an information server may be of a form that
  65.      could cause programs to operate in unexpected ways. The subroutines and
  66.      programs transferring data from that information server could check the
  67.      data for correctness of form; however, programs that *use* that data are
  68.      ultimately responsible for ensuring adherence to the documents that
  69.      define the correct form.
  70.  
  71.      For example, consider a program that uses the host name returned by
  72.      gethostbyname() as part of the string given to the popen() or system()
  73.      subroutines. Because gethostbyname() may use an information server
  74.      beyond your control, the data returned could be of a form that causes
  75.      the popen() or system() subroutines to execute other commands besides
  76.      the command specified by that program.
  77.  
  78.      This advisory speaks to a specific instance of a problem caused by the
  79.      information returned by DNS, but information from any server should be
  80.      checked for validity. Examples of other information servers are YP, NIS,
  81.      NIS+, and netinfo.
  82.  
  83. II.  Impact
  84.  
  85.      Programs that do not check data provided by information servers may
  86.      operate in unpredictable ways and give unexpected results. In
  87.      particular, exploitation of this vulnerability may allow remote access
  88.      by unauthorized users. Exploitation can also lead to root access by both
  89.      local and remote users.
  90.  
  91.  
  92. III. Solution
  93.  
  94.      For programs that you write or have written, consider integrating the
  95.      general solution in Section A below.
  96.  
  97.      In the specific case of the sendmail mail delivery program, Eric Allman,
  98.      the original author of sendmail, has produced patches that address the
  99.      problem. Section B provides details about these, along with vendor
  100.      information and additional steps you should take to protect sendmail.
  101.  
  102.  
  103.      A. General solution for Internet host names
  104.  
  105.         Use the host name and IP address validation subroutines available
  106.         at the locations listed below. Include them in all programs that
  107.         use the result of the host name lookups in any way.
  108.  
  109.           ftp://info.cert.org/pub/tools/ValidateHostname/IsValid.c
  110.           ftp://ftp.cert.dfn.de/pub/tools/net/ValidateHostname/IsValid.c
  111.  
  112.         The IsValid.c file contains code for the IsValidHostname and
  113.         IsValidIPAddress subroutines. This code can be used to check host
  114.         names and IP addresses for validity according to RFCs 952 and 1123,
  115.         well as names containing characters drawn from common practice,
  116.         namely "_" and "/".
  117.  
  118.         The following files are in the directory (from the README):
  119.  
  120.         IsValid.l       The lex/flex file containing the code for
  121.                         IsValidHostname and IsValidIPAddress
  122.                         MD5 (IsValid.l) = 2d35040aacae4fb12906eb1b48957776
  123.  
  124.         IsValid-raw.c   The C file created by running flex
  125.                         on IsValid.l
  126.                         MD5 (IsValid-raw.c) = 367c77d3ef84bc63a5c23d90eeb69330
  127.  
  128.         IsValid.c       The editted file created by internalizing
  129.                         variable and function definitions in
  130.                         IsValid-raw.c
  131.                         MD5 (IsValid.c) = ffe45f1256210aeb71691f4f7cdad27f
  132.  
  133.         IsValid.diffs   The set of diffs between IsValid-raw.c
  134.                         and IsValid.c
  135.                         MD5 (IsValid.diffs) = 3619022cf31d735151f8e8c83cce3744
  136.  
  137.         htest.c         A main routing for testing IsValidHostname
  138.                         and IsValidIPAddress
  139.                         MD5 (htest.c) = 2d50b2bffb537cc4e637dd1f07a187f4
  140.  
  141.  
  142.      B. Specific solutions in the case of sendmail
  143.  
  144.         Install a patch from your vendor when it becomes available (see B.1)
  145.         or install Eric Allman's patch (B.2). In both cases, install the
  146.         sendmail restricted shell program (B.3).
  147.  
  148.      1. Install a patch from your vendor.
  149.  
  150.         Below is a summary of the vendors who have reported status to us as
  151.         of the date of this advisory. More complete information is provided in
  152.         the appendix, which we will update as we receive more information.
  153.  
  154.         If your vendor's name is not on this list, please contact the vendor
  155.         directly.
  156.  
  157.         Vendor or Source
  158.         ----------------
  159.         Eric Allman
  160.         Hewlett-Packard Co.
  161.         IBM Corporation
  162.         Silicon Graphics Inc.
  163.         Sun Microsystems, Inc.
  164.  
  165.      2. Install a patch to sendmail.
  166.  
  167.         If you are presently running sendmail 8.6.12, there is a patch that
  168.         makes version 8.6.13.
  169.  
  170.         Similarly, if you are presently running sendmail 8.7.3, there is a
  171.         patch that makes version 8.7.4.
  172.  
  173.         The patches are available for anonymous FTP from
  174.  
  175.         ftp://info.cert.org/pub/tools/sendmail/
  176.         ftp://ftp.cs.berkeley.edu/ucb/src/sendmail/
  177.         ftp://ftp.auscert.org.au/pub/mirrors/ftp.cs.berkeley.edu/ucb/sendmail/
  178.         ftp://ftp.cert.dfn.de/pub/tools/net/sendmail/
  179.  
  180.  
  181.         Checksums for the 8.6.13 release:
  182.           MD5 (sendmail.8.6.13.base.tar.Z) = e8cf3ea19876d9b9def5c0bcb793d241
  183.           MD5 (sendmail.8.6.13.cf.tar.Z) = 4492026fa9e750cd33974322cb5a6fb9
  184.           MD5 (sendmail.8.6.13.misc.tar.Z) = 7ec5d31656e93e08a3892f0ae542b674
  185.           MD5 (sendmail.8.6.13.xdoc.tar.Z) = e4d3caebcdc4912ed2ecce1a77e45712
  186.  
  187.         Checksum for the 8.6.13 patch:
  188.            MD5 (sendmail.8.6.13.patch) = 6390b792cb5513ff622da8791d6d2073
  189.  
  190.         Checksum for the 8.7.4 release:
  191.            MD5 (sendmail.8.7.4.tar.Z) = 4bf774a12752497527aae11e2bdbab36
  192.  
  193.         Checksum for the 8.7.4 patch:
  194.            MD5 (sendmail.8.7.4.patch) = ef828ad91fe56e4eb6b0cacced864cd5
  195.  
  196.  
  197.      3. Run smrsh as additional protection for sendmail.
  198.  
  199.         With all versions of sendmail, we recommend that you install and use
  200.         the sendmail restricted shell program (smrsh). We urge you to do
  201.         this whether you use the vendor's supplied sendmail, install sendmail
  202.         yourself, or patch an earlier version of sendmail.
  203.  
  204.         Beginning with version 8.7.1, smrsh is included in the sendmail
  205.         distribution, in the subdirectory smrsh. See the RELEASE_NOTES file
  206.         for a description of how to integrate smrsh into your sendmail
  207.         configuration file.
  208.  
  209. .........................................................................
  210.  
  211. Appendix A: Vendor Information
  212.  
  213. Below is information we have received from vendors concerning the
  214. vulnerability described in this advisory. If you do not see your vendor's
  215. name, please contact the vendor directly for information.
  216.  
  217. - -----------------------
  218. Eric Allman (original author of sendmail)
  219.  
  220. Install a patch to sendmail.
  221.  
  222. If you are presently running sendmail 8.6.12, there is a patch that
  223. makes version 8.6.13.
  224.  
  225. Similarly, if you are presently running sendmail 8.7.3, there is a
  226. patch that makes version 8.7.4.
  227.  
  228. The patches are available for anonymous FTP from
  229.  
  230.         ftp://info.cert.org/pub/tools/sendmail/
  231.         ftp://ftp.cs.berkeley.edu/ucb/src/sendmail/
  232.         ftp://ftp.auscert.org.au/pub/mirrors/ftp.cs.berkeley.edu/ucb/sendmail/
  233.         ftp://ftp.cert.dfn.de/pub/tools/net/sendmail/
  234.  
  235. Checksums for the 8.6.13 release:
  236.           MD5 (sendmail.8.6.13.base.tar.Z) = e8cf3ea19876d9b9def5c0bcb793d241
  237.           MD5 (sendmail.8.6.13.cf.tar.Z) = 4492026fa9e750cd33974322cb5a6fb9
  238.           MD5 (sendmail.8.6.13.misc.tar.Z) = 7ec5d31656e93e08a3892f0ae542b674
  239.           MD5 (sendmail.8.6.13.xdoc.tar.Z) = e4d3caebcdc4912ed2ecce1a77e45712
  240.  
  241.         Checksum for the 8.6.13 patch:
  242.            MD5 (sendmail.8.6.13.patch) = 6390b792cb5513ff622da8791d6d2073
  243.  
  244.         Checksum for the 8.7.4 release:
  245.            MD5 (sendmail.8.7.4.tar.Z) = 4bf774a12752497527aae11e2bdbab36
  246.  
  247.         Checksum for the 8.7.4 patch:
  248.            MD5 (sendmail.8.7.4.patch) = ef828ad91fe56e4eb6b0cacced864cd5
  249.  
  250. - ----------------------
  251. Hewlett-Packard Company
  252.  
  253. Vulnerable, watch file for updates.
  254.  
  255. - ----------------------
  256. IBM Corporation
  257.  
  258. IBM is working on fixes for sendmail.
  259.  
  260. - ----------------------
  261. Silicon Graphics Inc.
  262.  
  263. It is HIGHLY RECOMMENDED that these measures be done on ALL SGI
  264. systems running IRIX 3.x, 4.x, 5.x and 6.x.  The issue will be
  265. permanently corrected in a future release of IRIX.
  266.  
  267. **** IRIX 3.x ****
  268.  
  269. Silicon Graphics Inc, no longer supports the IRIX 3.x operating system
  270. and therefore has no patches or binaries to provide.
  271.  
  272. However, two possible actions still remain: 1) upgrade the system to a
  273. supported version of IRIX (see below) and then install the patch or
  274. 2) obtain the sendmail source code from anonymous FTP at
  275. ftp.cs.berkeley.edu and compile the program manually.  Please, note
  276. that SGI will not assist with or support 3rd party sendmail programs.
  277.  
  278. **** IRIX 4.x ****
  279.  
  280. As of the date of this document, SGI does not have a IRIX 4.x binary
  281. replacement that addresses this particular issue.   If in the future,
  282. a replacement binary is generated, additional advisory information will
  283. be provided.
  284.  
  285. However, two other possible actions are: 1) upgrade the system to a
  286. supported version of IRIX (see below) and then install the patch or
  287. 2) obtain the sendmail source code from anonymous FTP at
  288. ftp.cs.berkeley.edu and compile the program manually.  Please, note
  289. that SGI will not assist with or support 3rd party sendmail programs.
  290.  
  291. **** IRIX 5.0.x, 5.1.x ****
  292.  
  293. For the IRIX operating systems versions 5.0.x and 5.1.x, an upgrade
  294. to 5.2 or better is required first.  When the upgrade is completed,
  295. then the patches described in the following sections can be applied
  296. depending on the final version of the upgrade.
  297.  
  298. **** IRIX 5.2, 5.3, 6.0, 6.0.1, 6.1 ****
  299.  
  300. For the IRIX operating system versions 5.2, 5.3, 6.0, 6.0.1, and 6.1
  301. an inst-able patch has been generated and made available via anonymous
  302. FTP and your service/support provider.  The patch is number 1146
  303. and will install on IRIX 5.2, 5.3, 6.0 and 6.0.1.
  304.  
  305.  
  306. The SGI anonymous FTP site is sgigate.sgi.com (204.94.209.1) or its
  307. mirror, ftp.sgi.com.   Patch 1146 can be found in the following
  308. directories on the FTP server:
  309.  
  310.         ~ftp/Security
  311.  
  312.                 or
  313.  
  314.         ~ftp/Patches/5.2
  315.         ~ftp/Patches/5.3
  316.         ~ftp/Patches/6.0
  317.         ~ftp/Patches/6.0.1
  318.         ~ftp/Patches/6.1
  319.  
  320.                         ##### Checksums ####
  321.  
  322. The actual patch will be a tar file containing the following files:
  323.  
  324.       Filename:                 patchSG0001146
  325.       Algorithm #1 (sum -r):    15709 3 patchSG0001146
  326.       Algorithm #2 (sum):       16842 3 patchSG0001146
  327.       MD5 checksum:             055B660E1D5C1E38BC3128ADE7FC9A95
  328.  
  329.       Filename:                 patchSG0001146.eoe1_man
  330.       Algorithm #1 (sum -r):    26276 76 patchSG0001146.eoe1_man
  331.       Algorithm #2 (sum):       1567 76 patchSG0001146.eoe1_man
  332.       MD5 checksum:             883BC696F0A57B47F1CBAFA74BF53E81
  333.  
  334.       Filename:                 patchSG0001146.eoe1_sw
  335.       Algorithm #1 (sum -r):    61872 382 patchSG0001146.eoe1_sw
  336.       Algorithm #2 (sum):       42032 382 patchSG0001146.eoe1_sw
  337.       MD5 checksum:             412AB1A279A030192EA2A082CBA0D6E7
  338.  
  339.       Filename:                 patchSG0001146.idb
  340.       Algorithm #1 (sum -r):    39588 4 patchSG0001146.idb
  341.       Algorithm #2 (sum):       10621 4 patchSG0001146.idb
  342.       MD5 checksum:             259DD47E4574DAF9041675D64C39102E
  343.  
  344.  
  345. Past SGI Advisories and security patches can be obtained via
  346. anonymous FTP from
  347.                 ftp://sgigate.sgi.com
  348. or its mirror
  349.                 ftp://ftp.sgi.com
  350.  
  351.  
  352. - ----------------------
  353.  
  354. Sun Microsystems, Inc.
  355.  
  356. Included below is information concerning sendmail patches as outlined in Sun
  357. Microsystems Security Bulletin: #00133, 8 March 1996. The complete bulletin is
  358. available from ftp://info.cert.org/pub/vendors/sun/sun_bulletin_00133.
  359.  
  360.     Here are our estimates for the availability of fixes incorporating
  361.     into sendmail more strenuous checks against name-server-based attacks.
  362.  
  363.     Note that the upcoming SunOS 4.1.x patches will represent the first
  364.     backport of sendmail 8.6.x to those platforms, and will probably be
  365.     assigned new patch numbers (instead of being recorded as revisions
  366.     of the existing patches).
  367.  
  368.          OS version     Est. date
  369.          ----------     ---------
  370.          5.6            in 5.6 FCS release
  371.          5.5.1          in 5.5.1 FCS release
  372.          5.5            Apr '96
  373.          5.4            Apr '96
  374.          5.3            Apr '96
  375.          4.1.4          May '96
  376.          4.1.3_U1       May '96
  377.          4.1.3          May '96
  378.  
  379. List of Current Sendmail Patches
  380.  
  381.    Until the patches listed above are available, Sun recommends that every
  382.    customer run the following sendmail patches on their systems.
  383.  
  384.    A. Current sendmail patches
  385.  
  386.    The latest sendmail patch for each supported version of SunOS is
  387.    shown below. All current SunOS 5.x patches are based on sendmail
  388.    V8; all SunOS 4.1.x patches are currently based on sendmail V5.
  389.  
  390.    [Note that no sendmail patches exists for SunOS 5.5 and SunOS
  391.     5.5_x86. All earlier fixes were built into these releases.]
  392.  
  393.          OS version     Patch ID        Released
  394.          ----------     ---------       ---------
  395.          5.4_x86        102064-05       19 Jan 96
  396.          5.4            102066-06       19 Jan 96
  397.          5.3            101739-08       19 Jan 96
  398.          4.1.4          102423-04        5 Oct 95
  399.          4.1.3_U1       101665-07        5 Oct 95
  400.          4.1.3          100377-22        5 Oct 95
  401.  
  402.     Patch 100377-22 was issued jointly for SunOS 4.1.3 and SunOS 4.1.3c.
  403.  
  404.     B. Obsolete sendmail patches
  405.  
  406.     The following sendmail patches are now obsolete, and will no longer
  407.     be maintained. Each is superseded by a patch listed above.
  408.  
  409.          OS version     Patch ID        Date Released
  410.          ----------     ---------       -------------
  411.          5.4_x86         102320-01      26 May 95
  412.          5.4             102319-01      26 May 95
  413.          5.3             101235-01       1 May 95
  414.          5.3 (sic)       101371-04       9 Feb 94
  415.          4.1.4           102356-01      22 Feb 95
  416.          4.1.3_U1        101436-08      28 Oct 94
  417.          4.1.3           100224-13      28 Oct 94
  418.  
  419. Checksum Table
  420.  
  421. In the checksum table we show the BSD and SVR4 checksums and MD5 digital
  422. signatures for the compressed tar archives.
  423.  
  424.     File            BSD          SVR4        MD5
  425.     Name            Checksum     Checksum    Digital Signature
  426.     --------------- -----------  ----------  --------------------------------
  427.     102064-05.tar.Z 08423   335  16923  669  2816EF17F40E2FA5E8260CD98D349875
  428.     102066-06.tar.Z 62613   385  52067  770  666E6D6075E40D2BFDB539830EF1BCDA
  429.     101739-08.tar.Z 60842   385  28595  770  369D4E0758672ADCDAD2219179B8A062
  430.     102423-04.tar.Z 40900   216  33691  432  022B546A882B42FF826FE28429B2EDD8
  431.     101665-07.tar.Z 44656   216  37045  431  86F942F8CCBAD905AB2AE8CA33490D2B
  432.     100377-22.tar.Z 39051   214  58206  427  7B55564E6104FABAD7283DAE1CDD3D4A
  433.  
  434. The checksums shown above are from the BSD-based checksum (on 4.1.x,
  435. /bin/sum; on SunOS 5.x, /usr/ucb/sum) and from the SVR4 version on
  436. on SunOS 5.x (/usr/bin/sum).
  437.  
  438.  
  439. - ---------------------------------------------------------------------------
  440. The CERT Coordination Center thanks Eric Allman of Pangaea Reference Systems,
  441. Andrew Gross of San Diego Supercomputer Center, Eric Halil of AUSCERT,
  442. Wolfgang Ley of DFN-CERT, and Paul Vixie for their support in the development
  443. of this advisory.
  444. - ---------------------------------------------------------------------------
  445.  
  446. If you believe that your system has been compromised, contact the CERT
  447. Coordination Center or your representative in the Forum of Incident
  448. Response and Security Teams (FIRST).
  449.  
  450. We strongly urge you to encrypt any sensitive information you send by email.
  451. The CERT Coordination Center can support a shared DES key and PGP. Contact the
  452. CERT staff for more information.
  453.  
  454. Location of CERT PGP key
  455.          ftp://info.cert.org/pub/CERT_PGP.key
  456.  
  457. CERT Contact Information
  458. - ------------------------
  459. Email    cert@cert.org
  460.  
  461. Phone    +1 412-268-7090 (24-hour hotline)
  462.                 CERT personnel answer 8:30-5:00 p.m. EST
  463.                 (GMT-5)/EDT(GMT-4), and are on call for
  464.                 emergencies during other hours.
  465.  
  466. Fax      +1 412-268-6989
  467.  
  468. Postal address
  469.         CERT Coordination Center
  470.         Software Engineering Institute
  471.         Carnegie Mellon University
  472.         Pittsburgh PA 15213-3890
  473.         USA
  474.  
  475. To be added to our mailing list for CERT advisories and bulletins, send your
  476. email address to
  477.         cert-advisory-request@cert.org
  478.  
  479. CERT publications, information about FIRST representatives, and other
  480. security-related information are available for anonymous FTP from
  481.         ftp://info.cert.org/pub/
  482.  
  483. CERT advisories and bulletins are also posted on the USENET newsgroup
  484.         comp.security.announce
  485.  
  486.  
  487. Copyright 1996 Carnegie Mellon University
  488. This material may be reproduced and distributed without permission provided it
  489. is used for noncommercial purposes and the copyright statement is included.
  490.  
  491. CERT is a service mark of Carnegie Mellon University.
  492.  
  493. ==============================================================================
  494. UPDATES
  495.  
  496. On March 29, 1996, the isValid.c program was updated. If you obtained a copy
  497. of this program prior to this date, you should retrieve the newer
  498. version. (See Sec. III.A for more information about isValid.c.)
  499.  
  500.  
  501. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  502. Revision history
  503.  
  504. June 4, 1997   Updated the URL pointing to the current version of BIND.
  505. Aug. 30, 1996  Incorporated changes from CA-96.04.README into the advisory.
  506. July 01, 1996  Introduction - added pointer to BIND 4.9.4.
  507. Mar. 29, 1996  Introduction - updated information about the next release of
  508.                   BIND
  509.                Updates section - added isValid.c program information.
  510.                Appendix, Sun - added information from Sun.
  511. Feb. 28, 1996  Appendix, SGI - added information.
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518. -----BEGIN PGP SIGNATURE-----
  519. Version: 2.6.2
  520.  
  521. iQCVAwUBM5VjY3VP+x0t4w7BAQExcQP/Q8Wfm/dEgdU0MBhD16PylH/Olpc0kjUw
  522. hfVkKZAL2uOfQAfMeeUh7fgTc3PKaBZ8hwbtiuM2626p17QPOnJxpF/UgRMep97c
  523. m5QnkB82tE2uIyYHD/fGk7Vx7fV+7LGJX2mo8BlTQf4OibYDZ+i0lKRNhwDW7CLZ
  524. xWfG2iipUpI=
  525. =e/UI
  526. -----END PGP SIGNATURE-----
  527.  
  528.