<<< Date Index >>>     <<< Thread Index >>>

[OpenPKG-SA-2004.036] OpenPKG Security Advisory (cvstrac)



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

________________________________________________________________________

OpenPKG Security Advisory                            The OpenPKG Project
http://www.openpkg.org/security.html              http://www.openpkg.org
openpkg-security@xxxxxxxxxxx                         openpkg@xxxxxxxxxxx
OpenPKG-SA-2004.036                                          06-Aug-2004
________________________________________________________________________

Package:             cvstrac
Vulnerability:       arbitrary code execution
OpenPKG Specific:    no

Affected Releases:   Affected Packages:           Corrected Packages:
OpenPKG CURRENT      <= cvstrac-1.1.3-20040505    >= cvstrac-1.1.3-20040806
OpenPKG 2.1          <= cvstrac-1.1.3-2.1.0       >= cvstrac-1.1.3-2.1.1
OpenPKG 2.0          <= cvstrac-1.1.2-2.0.0       >= cvstrac-1.1.2-2.0.1

Dependent Packages:  none

Description:
  As reported on BugTraq [1], Richard Ngo discovered a vulnerability
  in the CVS repository web browsing tool CVSTrac [2]. If properly
  exploited an attacker can execute arbitrary code on the CVSTrac host
  with the privileges of the associated web server.

  Please check whether you are affected by running "<prefix>/bin/openpkg
  rpm -q cvstrac". If you have the "cvstrac" package installed and its
  version is affected (see above), we recommend that you immediately
  upgrade it (see Solution) [3][4].

Solution:
  Select the updated source RPM appropriate for your OpenPKG release
  [5][6] and fetch it from the OpenPKG FTP service [7][8] or a mirror
  location. Verify its integrity [9], build a corresponding binary RPM
  from it [3] and update your OpenPKG installation by applying the
  binary RPM [4]. For the most recent release OpenPKG 2.1, perform the
  following operations to permanently fix the security problem (for
  other releases adjust accordingly).

  $ ftp ftp.openpkg.org
  ftp> bin
  ftp> cd release/2.1/UPD
  ftp> get cvstrac-1.1.3-2.1.1.src.rpm
  ftp> bye
  $ <prefix>/bin/openpkg rpm -v --checksig cvstrac-1.1.3-2.1.1.src.rpm
  $ <prefix>/bin/openpkg rpm --rebuild cvstrac-1.1.3-2.1.1.src.rpm
  $ su -
  # <prefix>/bin/openpkg rpm -Fvh <prefix>/RPM/PKG/cvstrac-1.1.3-2.1.1.*.rpm

Addendum:
  Although simply upgrading the affected CVSTrac installation
  does remove the vulnerability in question, the existing CVSTrac
  configuration should be corrected on the underlying SQLite level as
  well. Repeat the following for all project databases:

  $ <prefix>/bin/sqlite <prefix>/var/cvstrac/<project>.db
  sqlite> select value from config where name="filediff";
  rcsdiff -q -r%V1 -r%V2 -u '%F'
  sqlite> select value from config where name="filelist";
  co -q -p%V '%F' | diff -c /dev/null -
  sqlite> .exit

  Any commands using version or file replacements (%V, %V1, %V2, %F) but
  lacking single quotes (') around them should be corrected:

  $ <prefix>/bin/sqlite <prefix>/var/cvstrac/<project>.db
  sqlite> update config
     ...> set value="rcsdiff -q -r'%V1' -r'%V2' -u '%F'"
     ...> where name="filediff";
  sqlite> update config
     ...> set value="co -q -p '%V' '%F' | diff -c /dev/null -"
     ...> where name="filelist";
  sqlite> .exit

  An identical result can be achieved by logging in to the CVSTrac
  project pages as the user 'setup'. Select 'Diff Programs' from the
  'Setup Menu', and then review both HTML input fields for missing
  single quotes as shown.
________________________________________________________________________

References:
  [1] http://www.securityfocus.com/archive/1/370955/2004-08-03/2004-08-09/0
  [2] http://www.cvstrac.org/
  [3] http://www.openpkg.org/tutorial.html#regular-source
  [4] http://www.openpkg.org/tutorial.html#regular-binary
  [5] ftp://ftp.openpkg.org/release/2.1/UPD/cvstrac-1.1.3-2.1.1.src.rpm
  [6] ftp://ftp.openpkg.org/release/2.0/UPD/cvstrac-1.1.2-2.0.1.src.rpm
  [7] ftp://ftp.openpkg.org/release/2.1/UPD/
  [8] ftp://ftp.openpkg.org/release/2.0/UPD/
  [9] http://www.openpkg.org/security.html#signature
________________________________________________________________________

For security reasons, this advisory was digitally signed with the
OpenPGP public key "OpenPKG <openpkg@xxxxxxxxxxx>" (ID 63C4CB9F) of the
OpenPKG project which you can retrieve from http://pgp.openpkg.org and
hkp://pgp.openpkg.org. Follow the instructions on http://pgp.openpkg.org/
for details on how to verify the integrity of this advisory.
________________________________________________________________________

-----BEGIN PGP SIGNATURE-----
Comment: OpenPKG <openpkg@xxxxxxxxxxx>

iD8DBQFBE6uFgHWT4GPEy58RAg55AKCzGm4IZ0TfWKuqoaAEvk/qeKM0yQCgwZuL
aPzhupWq4Zo+33VhZPl9fAY=
=42L4
-----END PGP SIGNATURE-----