copyright | disclaimer | privacy | contact  
Australia's Leading Computer Emergency Response Team
 
Search this site

 
On this site

 > HOME
 > About AusCERT
 > Membership
 > Contact Us
 > PKI Services
 > Training
 > Publications
 > Sec. Bulletins
 > Conferences
 > News & Media
 > Services
 > Web Log
 > Site Map
 > Site Help
 > Member login





 

AL-2004.15 -- CVS Heap Overflow Vulnerability

Date: 28 May 2004
References: ESB-2004.0353  ESB-2004.0356  ESB-2004.0357  ESB-2004.0362  ESB-2004.0384  

Click here for printable version
Click here for PGP verifiable version
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

===========================================================================
A  U  S  C  E  R  T                                           A  L  E  R  T

                        AL-2004.15 -- AUSCERT ALERT
                      CVS Heap Overflow Vulnerability
                 Technical Cyber Security Alert TA04-147A
                                28 May 2004

===========================================================================

        AusCERT Alert Summary
        ---------------------

Product:                CVS (Concurrent Versions System) versions prior to 1.11.16
                        CVS Features versions prior to 1.12.8
Publisher:              US-CERT
Operating System:       BSD variants
                        Linux variants
                        UNIX variants
Impact:                 Root Compromise
Access Required:        Remote
CVE Names:              CAN-2004-0396

Ref:                    ESB-2004.0362
                        ESB-2004.0357
                        ESB-2004.0356
                        ESB-2004.0353

Comment: Exploits for this vulnerability are available publicly.

- --------------------------BEGIN INCLUDED TEXT--------------------

- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

           Technical Cyber Security Alert TA04-147A

               CVS Heap Overflow Vulnerability

   Original release date: May 26, 2004
   Last revised: --
   Source: US-CERT

Systems Affected

     * Concurrent Versions System (CVS) versions prior to 1.11.16
     * CVS Features versions prior to 1.12.8

Overview

   A heap overflow vulnerability in the Concurrent Versions System (CVS)
   could allow a remote attacker to execute arbitrary code on a
   vulnerable system.

I. Description

   CVS is a source code maintenance system that is widely used by
   open-source software development projects. There is a heap memory
   overflow vulnerability in the way CVS handles the insertion of
   modified and unchanged flags within entry lines. When processing an
   entry line, an additional byte of memory is allocated to flag the
   entry as modified or unchanged. There is a failure to check if a byte
   has been previously allocated for the flag, which creates an
   off-by-one buffer overflow. By calling a vulnerable function several
   times and inserting specific characters into the entry lines, a remote
   attacker could overwrite multiple blocks of memory. In some
   environments, the CVS server process is started by the Internet
   services daemon (inetd) and may run with root privileges.

   An authenticated client could exploit this vulnerability to execute
   arbitrary code, execute commands, modify sensitive information, or
   cause a denial of service. Note that if a CVS server is configured to
   permit anonymous read-only access, then this provides sufficient
   access to exploit a vulnerable server, as anonymous users are
   authenticated through the cvspserver process.

   US-CERT is tracking this issue as VU#192038. This reference number
   corresponds to CVE candidate CAN-2004-0396.

II. Impact

   An authenticated client could exploit this vulnerability to execute
   arbitrary code on the vulnerable system with the privileges of the CVS
   server process. It is possible for an anonymous user with read-only
   access to exploit a vulnerable server as they are authenticated
   through the cvspserver process.

   In addition to compromising the system running CVS, there is a
   significant secondary impact in that source code maintained in CVS
   repositories could be modified to include Trojan horses, backdoors, or
   other malicious code.

III. Solution

   Apply Patch or Upgrade

     Apply the appropriate patch or upgrade as specified by your vendor.
     For vendor specific responses, please see your vendor's website or
     Vulnerability Note VU#192038.

     This issue has been resolved in Stable CVS Version 1.11.16 and CVS
     Feature Version 1.12.8.

   Disable CVS Server

     Until a patch or upgrade can be applied, consider disabling the CVS
     server.

   Block or Restrict Access

     Block or restrict access to the CVS server from untrusted hosts and
     networks. The CVS server typically listens on 2401/tcp, but may use
     another port or protocol.
     Limit CVS Server Privileges
     * Configure CVS server to run in a restricted (chroot) environment.
     * Run CVS servers with the minimum set of privileges required on the
       host file system.
     * Provide separate systems for development (write) and
       public/anonymous (read-only) CVS access.
     * Host public/anonymous CVS servers on single-purpose, secured
       systems.

     Note that some of these workarounds will only limit the scope and
     impact of possible attacks. Note also that anonymous (read-only)
     access is sufficent to exploit this vulnerability.

Appendix B. References

     * http://security.e-matters.de/advisories/072004.html
     * http://secunia.com/advisories/11641/
     * http://www.securitytracker.com/alerts/2004/May/1010208.html
     * http://www.netsys.com/library/papers/chrooted-ssh-cvs-server.txt
  _________________________________________________________________

   US-CERT thanks Stefan Esser of e-matters for reporting this problem
   and for information used to construct this advisory.
  _________________________________________________________________

   Feedback can be directed to the authors: Jason A. Rafail and 
   Damon Morda
  _________________________________________________________________

   The latest version of this document can be found at:
   
     <http://www.us-cert.gov/cas/techalerts/TA04-147A.html>
  _________________________________________________________________
   
   Copyright 2004 Carnegie Mellon University.
   
   Terms of use:

     <http://www.us-cert.gov/legal.html>

  _________________________________________________________________

   Revision History

   May 26, 2004: Initial release
- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFAtLe5XlvNRxAkFWARAr2XAKDPDLKJJKbP3aSmuEU9uOm1cNdxrQCfUXdT
UIlGMjabcCC02Ye9x9UXFzk=
=/0Hb
- -----END PGP SIGNATURE-----

- --------------------------END INCLUDED TEXT--------------------

This alert is provided as a service to AusCERT's members.  As AusCERT did
not write the document quoted above, AusCERT has had no control over its   
content. The decision to follow or act on information or advice contained in
this security bulletin is the responsibility of each user or organisation, and 
should be considered in accordance with your organisation's site policies and 
procedures. AusCERT takes no responsibility for consequences which may arise 
from following or acting on information or advice contained in this security 
bulletin.

NOTE: This is only the original release of the alert.  It may not be
updated when updates to the original are made.  If downloading at a later
date, it is recommended that the alert is retrieved directly from the
author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the alert above.  If you have any questions or need further information,
please contact them directly.

Previous advisories, alerts and external security bulletins can be 
retrieved from:

        http://www.auscert.org.au/render.html?cid=1977

If you believe that your computer system has been compromised or attacked in 
any way, we encourage you to let us know by completing the secure National IT 
Incident Reporting Form at:

        http://www.auscert.org.au/render.html?it=3192

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business
                hours which are GMT+10:00 (AEST).  On call after hours
                for member emergencies only.
-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iQCVAwUBQLaWQCh9+71yA2DNAQJ+wQP/XNGt7Lcm5uSIh0C2VfclG9U2k+heM10F
4xYfrTDEMvS+ADoMh5UHA6TBVGCHN43y1lEy7eJUOPlC6go9zoL7nAeSeRaoIsTZ
OtYUxNta+efi2q+euLvPSkFbxsjZxZOuy6G/1PbAPotqii1dehufqdbVeLY7H7+8
IhpiHsmjHFw=
=Fgtx
-----END PGP SIGNATURE-----