-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ________________________________________________________________________ OpenPKG Security Advisory The OpenPKG Project http://www.openpkg.org/security.html http://www.openpkg.org firstname.lastname@example.org email@example.com 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 , Richard Ngo discovered a vulnerability in the CVS repository web browsing tool CVSTrac . 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 "
/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) . Solution: Select the updated source RPM appropriate for your OpenPKG release  and fetch it from the OpenPKG FTP service  or a mirror location. Verify its integrity , build a corresponding binary RPM from it  and update your OpenPKG installation by applying the binary RPM . 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 $ /bin/openpkg rpm -v --checksig cvstrac-1.1.3-2.1.1.src.rpm $ /bin/openpkg rpm --rebuild cvstrac-1.1.3-2.1.1.src.rpm $ su - # /bin/openpkg rpm -Fvh /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: $ /bin/sqlite /var/cvstrac/ .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: $ /bin/sqlite /var/cvstrac/ .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:  http://www.securityfocus.com/archive/1/370955/2004-08-03/2004-08-09 /0  http://www.cvstrac.org/  http://www.openpkg.org/tutorial.html#regular-source  http://www.openpkg.org/tutorial.html#regular-binary  ftp://ftp.openpkg.org/release/2.1/UPD/cvstrac-1.1.3-2.1.1.src.rpm  ftp://ftp.openpkg.org/release/2.0/UPD/cvstrac-1.1.2-2.0.1.src.rpm  ftp://ftp.openpkg.org/release/2.1/UPD/  ftp://ftp.openpkg.org/release/2.0/UPD/  http://www.openpkg.org/security.html#signature ________________________________________________________________________ For security reasons, this advisory was digitally signed with the OpenPGP public key "OpenPKG "(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 iD8DBQFBE6uFgHWT4GPEy58RAg55AKCzGm4IZ0TfWKuqoaAEvk/qeKM0yQCgwZuL aPzhupWq4Zo+33VhZPl9fAY= =42L4 -----END PGP SIGNATURE-----