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

  1.  
  2. -----BEGIN PGP SIGNED MESSAGE-----
  3.  
  4. =============================================================================
  5. CERT* Advisory CA-97.09
  6. Original issue date: April 7, 1997
  7. Last revised:  June 3, 1997
  8.                Section III.A and Appendix - Added vendor information.
  9.                  for NetManage, Inc.
  10.  
  11.                A complete revision history is at the end of this file.
  12.  
  13. Topic: Vulnerability in IMAP and POP
  14. - -----------------------------------------------------------------------------
  15.  
  16. The CERT Coordination Center has received reports of a vulnerability
  17. in some versions of the Internet Message Access Protocol (IMAP) and
  18. Post Office Protocol (POP) implementations (imapd, ipop2d, and
  19. ipop3d). Information about this vulnerability has been publicly
  20. distributed.
  21.  
  22. By exploiting this vulnerability, remote users can obtain unauthorized root
  23. access.
  24.  
  25. The CERT/CC team recommends installing a patch if one is available or
  26. upgrading to IMAP4rev1. Until you can do so, we recommend disabling the IMAP
  27. and POP services at your site.
  28.  
  29. We will update this advisory as we receive additional information.
  30. Please check our advisory files regularly for updates that relate to
  31. your site.
  32.  
  33. - -----------------------------------------------------------------------------
  34. I.   Description
  35.  
  36.      The current version of Internet Message Access Protocol (IMAP) supports
  37.      both online and offline operation, permitting manipulation of remote
  38.      message folders. It provides access to multiple mailboxes (possibly on
  39.      multiple servers), and supports nested mailboxes as well as
  40.      resynchronization with the server. The current version also provides a
  41.      user with the ability to create, delete, and rename mailboxes. Additional
  42.      details concerning the functionality of IMAP can be found in RFC 2060
  43.      (the IMAP4rev1 specification) available from
  44.  
  45.                 http://ds.internic.net/rfc/rfc2060.txt
  46.  
  47.      The Post Office Protocol (POP) was designed to support offline mail
  48.      processing. That is, the client connects to the server to download mail
  49.      that the server is holding for the client. The mail is deleted from the
  50.      server and is handled offline (locally) on the client machine.
  51.  
  52.      In both protocols, the server must run with root privileges so it can
  53.      access mail folders and undertake some file manipulation on behalf of the
  54.      user logging in. After login, these privileges are discarded. However, a
  55.      vulnerability exists in the way the login transaction is handled, and
  56.      this can be exploited to gain privileged access on the server. By
  57.      preparing carefully crafted text to a system running a vulnerable version
  58.      of these servers, remote users may be able to cause a buffer overflow and
  59.      execute arbitrary instructions with root privileges.
  60.  
  61.      Information about this vulnerability has been widely distributed.
  62.  
  63. II.  Impact
  64.  
  65.      Remote users can obtain root access on systems running a vulnerable IMAP
  66.      or POP server. They do not need access to an account on the system to do
  67.      this.
  68.  
  69. III. Solution
  70.  
  71.      Install a patch from your vendor (see Section A) or upgrade to the latest
  72.      version of IMAP (Section B).  If your POP server is based on the
  73.      University of Washington IMAP server code, you should also upgrade to
  74.      the latest version of IMAP. Until you can take one of these actions, you
  75.      should disable services (Section C). In all cases, we urge you to take
  76.      the additional precaution described in Section D.
  77.  
  78.   A. Obtain and install a patch from your vendor
  79.  
  80.      Below is a list of vendors who have provided information about this
  81.      vulnerability. Details are in Appendix A of this advisory; we will update
  82.      the appendix as we receive more information. If your vendor's name is not
  83.      on this list, please contact your vendor directly.
  84.  
  85.         Berkeley Software Design, Inc. (BSDI)
  86.         Carnegie Mellon University
  87.         Cray Research
  88.         Digital Equipment Corporation
  89.         Linux -  Caldera, Inc.
  90.                  Debian
  91.                  Red Hat
  92.         Microsoft Corporation
  93.         NetManage, Inc.
  94.         Netscape
  95.         QUALCOMM, Incorporated
  96.         Sun Microsystems, Inc.
  97.         University of Washington
  98.  
  99.   B. Upgrade to the latest version of IMAP
  100.  
  101.      An alternative to installing vendor patches is upgrading to IMAP4rev1,
  102.      which is available from
  103.  
  104.         ftp://ftp.cac.washington.edu/mail/imap.tar.Z
  105.  
  106.      Please note that checksums change when files are updated.  The
  107.      imap.tar.Z file can undergo frequent changes,  therefore the
  108.      checksums have not been included here.
  109.  
  110.   C. Disable services
  111.  
  112.      Until you can take one of the above actions, temporarily disable the POP
  113.      and IMAP services. On many systems, you will need to edit the
  114.      /etc/inetd.conf file. However, you should check your vendor's
  115.      documentation because systems vary in file location and the exact
  116.      changes required (for example, sending the inetd process a HUP signal or
  117.      killing and restarting the daemon).
  118.  
  119.      If you are not able to temporarily disable the POP and IMAP services,
  120.      then you should at least limit access to the vulnerable services to
  121.      machines in your local network. This can be done by installing the
  122.      tcp_wrappers described in Section D, not only for logging but also for
  123.      access control. Note that even with access control via tcp_wrappers, you
  124.      are still vulnerable to attacks from hosts that are allowed to connect
  125.      to the vulnerable POP or IMAP service.
  126.  
  127.  D.  Additional precaution
  128.  
  129.      Because IMAP or POP is launched out of inetd.conf, tcp_wrappers can be
  130.      installed to log connections which can then be examined for suspicious
  131.      activity. You may want to consider filtering connections at the firewall
  132.      to discard unwanted/unauthorized connections.
  133.  
  134.      The tcp_wrappers tool is available in
  135.  
  136.         ftp://info.cert.org/pub/tools/tcp_wrappers/tcp_wrappers_7.5.tar.gz
  137.  
  138.         MD5 (tcp_wrappers_7.5.tar.gz) = 8c7a17a12d9be746e0488f7f6bfa4abb
  139.  
  140.      Note that this precaution does not address the vulnerability described
  141.      in this advisory, but it is a good security practice in general.
  142.  
  143. ...........................................................................
  144.  
  145. Appendix A - Vendor Information
  146.  
  147. Below is a list of the vendors who have provided information for this
  148. advisory. We will update this appendix as we receive additional information.
  149. If you do not see your vendor's name, the CERT/CC did not hear from that
  150. vendor. Please contact the vendor directly.
  151.  
  152.  
  153. Berkeley Software Design, Inc. (BSDI)
  154. =====================================
  155.  
  156.   We're working on patches for both BSD/OS 2.1 and BSD/OS 3.0 for
  157.   imap (which we include as part of pine).
  158.  
  159. Carnegie Mellon University
  160. ==========================
  161.  
  162.   Cyrus Server 1.5.2, with full IMAP4rev1 and pop3 capabilities, is NOT
  163.   affected by this report and is NOT vulnerable.
  164.  
  165. Cray Research
  166. =============
  167.  
  168.   Not vulnerable.
  169.  
  170. Digital Equipment Corporation
  171. =============================
  172.  
  173.   This reported problem is not present for Digital's UNIX or
  174.   Digital ULTRIX Operating Systems Software.
  175.  
  176.  
  177. Linux Systems
  178. =============
  179.  
  180.   Caldera, Inc.
  181.   -------------
  182.   On systems such as Caldera OpenLinux 1.0, an unprivileged user can
  183.   obtain root access.
  184.  
  185.   As a temporary workaround, you can disable the POP and IMAP services
  186.   in /etc/inetd.conf, and then kill and restart inetd.
  187.  
  188.   A better solution is to install the new RPM package that contains
  189.   the fixed versions of the IMAP and POP daemons.  They are located
  190.   on Caldera's FTP server (ftp.caldera.com):
  191.  
  192.         /pub/openlinux/updates/1.0/006/RPMS/imap-4.1.BETA-1.i386.rpm
  193.  
  194.         The MD5 checksum (from the "md5sum" command) for this package is:
  195.  
  196.         45a758dfd30f6d0291325894f9ec4c18
  197.  
  198.   This and other Caldera security resources are located at:
  199.  
  200.                 http://www.caldera.com/tech-ref/security/
  201.  
  202.   Debian
  203.   ------
  204.   Debian linux is not vulnerable.  For more information see
  205.  
  206.         http://cgi.debian.org/www-master/debian.org/security.html
  207.  
  208.   Red Hat
  209.   -------
  210.   The IMAP servers included with all versions of Red Hat Linux have
  211.   a buffer overrun which allow *remote* users to gain root access on
  212.   systems which run them. A fix for Red Hat 4.1 is now available
  213.   (details on it at the end of this note).
  214.  
  215.   Users of Red Hat 4.0 should apply the Red Hat 4.1 fix. Users of previous
  216.   releases of Red Hat Linux are strongly encouraged to upgrade or simply
  217.   not run imap. You can remove imap from any machine running with Red
  218.   Hat Linux 2.0 or later by running the command "rpm -e imap", rendering
  219.   them immune to this problem.
  220.  
  221.   All of the new packages are PGP signed with Red Hat's PGP key,
  222.   and may be obtained from ftp.redhat.com:/updates/4.1. If
  223.   you have direct Internet access, you may upgrade these packages on your
  224.   system with the following commands:
  225.  
  226.   Intel:
  227.   rpm -Uvh ftp://ftp.redhat.com/updates/4.1/i386/imap-4.1.BETA-3.i386.rpm
  228.  
  229.         MD5 (imap-4.1.BETA-3.i386.rpm) = 8ac64fff475ee43d409fc9776a6637a6
  230.  
  231.   Alpha:
  232.   rpm -Uvh ftp://ftp.redhat.com/updates/4.1/alpha/imap-4.1.BETA-3.alpha.rpm
  233.  
  234.         MD5 (imap-4.1.BETA-3.alpha.rpm) = fd42ac24d7c4367ee51fd00e631cae5b
  235.  
  236.   SPARC:
  237.   rpm -Uvh ftp://ftp.redhat.com/updates/4.1/sparc/imap-4.1.BETA-3.sparc.rpm
  238.  
  239.         MD5 (imap-4.1.BETA-3.sparc.rpm) = 751598aae3d179284b8ea4d7a9b78868
  240.  
  241. Microsoft
  242. =========
  243.  
  244. Microsoft's Exchange POP and IMAP servers and Microsoft's Commericial
  245. Internet System are not vulnerable
  246.  
  247. NetManage, Inc.
  248. =========
  249.  
  250. NetManage's ZPOP pop server is not vulnerable.
  251.  
  252.  
  253. Netscape
  254. ========
  255.  
  256.   Netscape's POP3/IMAP4 implementation is not vulnerable.
  257.  
  258. QUALCOMM Incorporated
  259. ======================
  260.  
  261.   Our engineers have examined the QPopper source code, which is based
  262.   on source from UC Berkeley. They determined that QPopper is *NOT*
  263.   vulnerable to a buffer overflow attack as described in CA-97.09.
  264.   It strictly checks the size of messages before copying them into its
  265.   buffer.
  266.  
  267. Sun Microsystems, Inc.
  268. ======================
  269.  
  270.   Not vulnerable.
  271.  
  272. University of Washington
  273. ========================
  274.  
  275.   This vulnerability has been detected in the University of Washington c-client
  276.   library used in the UW IMAP and POP servers.  This vulnerability affects all
  277.   versions of imapd prior to v10.165, all versions of ipop2d prior to 2.3(32),
  278.   and all versions of ipop3d prior to 3.3(27).
  279.  
  280.   It is recommended that all sites using these servers upgrade to the
  281.   latest versions, available in the UW IMAP toolkit:
  282.  
  283.         ftp://ftp.cac.washington.edu/mail/imap.tar.Z
  284.  
  285.   Please note that checksums change when files are updated.  The
  286.   imap.tar.Z file can undergo frequent changes,  therefore the checksums
  287.   have not been included here.
  288.  
  289.   This is a source distribution which includes imapd, ipop2d, ipop3d. and
  290.   the c-client library.  The IMAP server in this distribution conforms with
  291.   RFC2060 (the IMAP4rev1 specification).
  292.  
  293.   Sites which are not yet prepared to upgrade from IMAP2bis to IMAP4
  294.   service may obtain a corrected IMAP2bis server as part of the latest
  295.   (3.96) UW Pine distribution, available at:
  296.  
  297.         ftp://ftp.cac.washington.edu/pine/pine.tar.Z
  298.  
  299.         MD5 (pine.tar.Z) = 37138f0d1ec3175cf1ffe6c062c9abbf
  300.  
  301. - -----------------------------------------------------------------------------
  302. The CERT Coordination Center thanks the University of Washington's
  303. Computing and Communications staff for information relating to this
  304. advisory. We also thank Wolfgang Ley of DFN-CERT for his input. We
  305. thank Matthew Wall of Carnegie Mellon University for additional
  306. insightful feedback.
  307.  
  308. - -----------------------------------------------------------------------------
  309.  
  310. If you believe that your system has been compromised, contact the CERT
  311. Coordination Center or your representative in the Forum of Incident Response
  312. and Security Teams (see http://www.first.org/team-info)
  313.  
  314.  
  315. CERT/CC Contact Information
  316. - ---------------------------
  317. Email    cert@cert.org
  318.  
  319. Phone    +1 412-268-7090 (24-hour hotline)
  320.                 CERT personnel answer 8:30-5:00 p.m. EST(GMT-5) / EDT(GMT-4)
  321.                 and are on call for emergencies during other hours.
  322.  
  323. Fax      +1 412-268-6989
  324.  
  325. Postal address
  326.          CERT Coordination Center
  327.          Software Engineering Institute
  328.          Carnegie Mellon University
  329.          Pittsburgh PA 15213-3890
  330.          USA
  331.  
  332. Using encryption
  333.    We strongly urge you to encrypt sensitive information sent by email. We can
  334.    support a shared DES key or PGP. Contact the CERT/CC for more information.
  335.    Location of CERT PGP key
  336.          ftp://info.cert.org/pub/CERT_PGP.key
  337.  
  338. Getting security information
  339.    CERT publications and other security information are available from
  340.         http://www.cert.org/
  341.         ftp://info.cert.org/pub/
  342.  
  343.    CERT advisories and bulletins are also posted on the USENET newsgroup
  344.         comp.security.announce
  345.  
  346.    To be added to our mailing list for advisories and bulletins, send
  347.    email to
  348.         cert-advisory-request@cert.org
  349.    In the subject line, type
  350.         SUBSCRIBE  your-email-address
  351.  
  352. - ---------------------------------------------------------------------------
  353. Copyright 1997 Carnegie Mellon University
  354. This material may be reproduced and distributed without permission provided
  355. it is used for noncommercial purposes and the copyright statement is
  356. included.
  357.  
  358. * Registered in the U.S. Patent and Trademark Office.
  359.  
  360. - ---------------------------------------------------------------------------
  361.  
  362. This file: ftp://info.cert.org/pub/cert_advisories/CA-97.09.imap_pop
  363.            http://www.cert.org
  364.                click on "CERT Advisories"
  365.  
  366. ===========================================================================
  367. UPDATES
  368.  
  369. April 8, 1997
  370. - -------------
  371.  
  372. We have received requests for clarification.  The vulnerability
  373. described in this advisory relates to certain server implementations
  374. and is not in the protocol itself.  See Appendix A for vendor and
  375. server information.
  376.  
  377. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  378. Revision history
  379.  
  380. June 3, 1997  Section III.A and Appendix - Added vendor information.
  381.                   for NetManage, Inc.
  382. May 1, 1997   Section III.A and Appendix A - Added vendor information
  383.                   for Microsoft Corporation.
  384. Apr 18, 1997  Section III.A and Appendix A - Added vendor information
  385.                   for Debian and Netscape.
  386. Apr 11, 1997  Section III.B. - Removed checksum information for the
  387.                   imap.tar.Z distribution and added an explanation.
  388. Apr 9, 1997   Appendix A - added vendor information for Digital Equipment
  389.                   Corporation and QUALCOMM Incorporated.
  390.               Updated vendor information for Sun Microsystems, Inc.
  391.               Added another name to acknowledgment.
  392. Apr 08, 1997  Updates - Added clarification that the vulnerability
  393.                   is an implementation error and not an error in the protocol
  394.               Appendix - added vendor information for Caldera and the
  395.                   Carnegie Mellon University Cyrus Server
  396.               Acknowledgments - Added a name that was inadvertently left out
  397.  
  398.  
  399. -----BEGIN PGP SIGNATURE-----
  400. Version: 2.6.2
  401.  
  402. iQCVAwUBM5V1HHVP+x0t4w7BAQEL0AP/f5iqEJbXwKoVBkSoRAXuwYOHdAWuRuYD
  403. gCBSmooFWn3p60FbzfbfLUW3Iv6Dzm7o8r5LgQHqIftLsZQK1UidxYSrxZNCoS6L
  404. //gHeD6pQDRlx475SBgH6DpZ/2x+ivK1ETg7DErVo3cclnZzo73chdMjHvHuirTj
  405. KE3ZgxNr/pc=
  406. =QdjX
  407. -----END PGP SIGNATURE-----
  408.  
  409.