__________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Capability ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN unzip -- race condition [DSA-903-1] November 21, 2005 18:00 GMT Number Q-057 [REVISED 13 Jan 2006] [REVISED 2 May 2007] ______________________________________________________________________________ PROBLEM: A race condition in the permissions setting code in unzip was discovered. PLATFORM: Debian GNU/Linux 3.0 (woody) Debian GNU/Linux 3.1 (sarge) Red Hat Desktop (v. 4) Red Hat Enterprise Linux AS, ES, WS (v. 4) DAMAGE: When decompressing a file in a directory an attacker has access to, unzip could be tricked to set the file permissions to a different file the user has permissions to. SOLUTION: Apply current patches. ______________________________________________________________________________ VULNERABILITY The risk is LOW. Attacker must have access to directory. ASSESSMENT: ______________________________________________________________________________ LINKS: CIAC BULLETIN: http://www.ciac.org/ciac/bulletins/q-057.shtml ORIGINAL BULLETIN: http://www.us.debian.org/security/2005/dsa-903 ADDITIONAL LINK: https://rhn.redhat.com/errata/RHSA-2007-0203.html CVE: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name= CAN-2005-2475 ______________________________________________________________________________ REVISION HISTORY: 01/13/06 - The unzip update in DSA 903 contained a regression so that symbolic links that are resolved later in a zip archive aren't supported anymore. This update corrects this behaviour. 05/02/07 - revised Q-057 to add a link to Red Hat RHSA-2007:0203-7 for Red Hat Desktop (v. 4), Red Hat Enterprise Linux AS, ES, WS (v. 4). [***** Start DSA-903-1 *****] DSA-903-2 unzip -- race condition Date Reported: 21 Nov 2005 Affected Packages: unzip Vulnerable: Yes Security database references: In the Debian bugtracking system: Bug 321927, Bug 343680. In the Bugtraq database (at SecurityFocus): BugTraq ID 14450. In Mitre's CVE dictionary: CAN-2005-2475. More information: The unzip update in DSA 903 contained a regression so that symbolic links that are resolved later in a zip archive aren't supported anymore. This update corrects this behaviour. For completeness, below please find the original advisory text: Imran Ghory discovered a race condition in the permissions setting code in unzip. When decompressing a file in a directory an attacker has access to, unzip could be tricked to set the file permissions to a different file the user has permissions to. For the old stable distribution (woody) this problem has been fixed in version 5.50-1woody5. For the stable distribution (sarge) this problem has been fixed in version 5.52-1sarge3. For the unstable distribution (sid) this problem has been fixed in version 5.52-6. We recommend that you upgrade your unzip package. Fixed in: Debian GNU/Linux 3.0 (woody) Source: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.50-1woody5.dsc http://security.debian.org/pool/updates/main/u/unzip/unzip_5.50-1woody5.diff.gz http://security.debian.org/pool/updates/main/u/unzip/unzip_5.50.orig.tar.gz Alpha: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.50-1woody5_alpha.deb ARM: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.50-1woody5_arm.deb Intel IA-32: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.50-1woody5_i386.deb Intel IA-64: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.50-1woody5_ia64.deb HPPA: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.50-1woody5_hppa.deb Motorola 680x0: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.50-1woody5_m68k.deb Big endian MIPS: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.50-1woody5_mips.deb Little endian MIPS: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.50-1woody5_mipsel.deb PowerPC: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.50-1woody5_powerpc.deb IBM S/390: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.50-1woody5_s390.deb Sun Sparc: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.50-1woody5_sparc.deb Debian GNU/Linux 3.1 (sarge) Source: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.52-1sarge3.dsc http://security.debian.org/pool/updates/main/u/unzip/unzip_5.52-1sarge3.diff.gz http://security.debian.org/pool/updates/main/u/unzip/unzip_5.52.orig.tar.gz Alpha: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.52-1sarge3_alpha.deb AMD64: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.52-1sarge3_amd64.deb ARM: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.52-1sarge3_arm.deb Intel IA-32: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.52-1sarge3_i386.deb Intel IA-64: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.52-1sarge3_ia64.deb HPPA: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.52-1sarge3_hppa.deb Motorola 680x0: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.52-1sarge3_m68k.deb Big endian MIPS: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.52-1sarge3_mips.deb Little endian MIPS: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.52-1sarge3_mipsel.deb PowerPC: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.52-1sarge3_powerpc.deb IBM S/390: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.52-1sarge3_s390.deb Sun Sparc: http://security.debian.org/pool/updates/main/u/unzip/unzip_5.52-1sarge3_sparc.deb MD5 checksums of the listed files are available in the original advisory. MD5 checksums of the listed files are available in the revised advisory. [***** End DSA-903-1 *****] _______________________________________________________________________________ CIAC wishes to acknowledge the contributions of Debian for the information contained in this bulletin. _______________________________________________________________________________ CIAC, the Computer Incident Advisory Capability, is the computer security incident response team for the U.S. Department of Energy (DOE) and the emergency backup response team for the National Institutes of Health (NIH). CIAC is located at the Lawrence Livermore National Laboratory in Livermore, California. CIAC is also a founding member of FIRST, the Forum of Incident Response and Security Teams, a global organization established to foster cooperation and coordination among computer security teams worldwide. CIAC services are available to DOE, DOE contractors, and the NIH. CIAC can be contacted at: Voice: +1 925-422-8193 (7x24) FAX: +1 925-423-8002 STU-III: +1 925-423-2604 E-mail: ciac@ciac.org Previous CIAC notices, anti-virus software, and other information are available from the CIAC Computer Security Archive. World Wide Web: http://www.ciac.org/ Anonymous FTP: ftp.ciac.org PLEASE NOTE: Many users outside of the DOE, ESnet, and NIH computing communities receive CIAC bulletins. If you are not part of these communities, please contact your agency's response team to report incidents. Your agency's team will coordinate with CIAC. The Forum of Incident Response and Security Teams (FIRST) is a world-wide organization. A list of FIRST member organizations and their constituencies can be obtained via WWW at http://www.first.org/. This document was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial products, process, or service by trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. LAST 10 CIAC BULLETINS ISSUED (Previous bulletins available from CIAC) Q-047: VERITAS Cluster Server for UNIX Q-048: VERITAS NetBackup 5.x Q-049: HP-UX envd Local Execution of Privileged Code Q-050: awstats Q-051: Flash Player 7 Improper Memory Access Vulnerability Q-052: awstats Q-053: HP-UX Running xterm Local Unauthorized Access Q-054: gdk-pixbuf security update Q-055: phpsysinfo Q-056: fetchmail -- programming error