Date: Tue, 12 Mar 2002 14:05:14 -0500
From: NetBSD Security Officer <security-officer@netbsd.org.>
To: [email protected]Subject: NetBSD Security Advisory 2002-002: gzip buffer overrun with long filename
-----BEGIN PGP SIGNED MESSAGE-----
NetBSD Security Advisory 2002-002
Topic: gzip buffer overrun with long filename
Version: NetBSD-current: prior to January 16, 2002
NetBSD-1.5.*: affected up to and including 1.5.2
NetBSD-1.4.*: affected up to and including 1.4.3
Severity: local buffer overrun
(possible remote root privilege compromise if a system
runs certain alternative ftp daemons)
Fixed: NetBSD-current: January 16, 2002
NetBSD-1.5 branch: January 16, 2002
NetBSD-1.4 branch: January 16, 2002
Abstract
========
/usr/bin/gzip, a file compression program, does not properly check
supplied filenames against its buffer size. It could lead to
execution of arbitrary code under the privilege with which gzip is
running.
There are ftp daemon programs that invoke gzip on demand (like wu-ftpd).
If your systems run these daemons, depending on the configuration it could
lead to a remote root compromise.
Technical Details
=================
http://www.securityfocus.com/bid/3712
Solutions and Workarounds
The following instructions describe how to upgrade your /usr/bin/gzip
binaries by updating your source tree and rebuilding and
installing a new version of /usr/bin/gzip.
* NetBSD-current:
Systems running NetBSD-current dated from before 2002-01-16
should be upgraded to NetBSD-current dated 2001-01-17 or later.
The following directories need to be updated from the
netbsd-current CVS branch (aka HEAD):
gnu/usr.bin/gzip
To update from CVS, re-build, and re-install gzip:
# cd src
# cvs update -d -P gnu/usr.bin/gzip
# cd gnu/usr.bin/gzip
# make cleandir dependall
# make install
* NetBSD 1.5, 1.5.1, 1.5.2:
Systems running NetBSD 1.5, 1.5.1 or 1.5.2 sources dated from
before 2002-01-16 should be upgraded from NetBSD 1.5.*
sources dated 2002-01-17 or later.
NetBSD 1.5.3 will not be vulnerable.
The following directories need to be updated from the
netbsd-1-5 CVS branch:
gnu/usr.bin/gzip
To update from CVS, re-build, and re-install gzip:
# cd src
# cvs update -d -P gnu/usr.bin/gzip
# cd gnu/usr.bin/gzip
# make cleandir dependall
# make install
Alternatively, apply the following patch (with potential offset
differences):
ftp://ftp.netbsd.org/pub/NetBSD/security/patches/SA2002-002-gzip.patch
To patch, re-build and re-install gzip(1):
# cd src/gnu/usr.bin/gzip
# patch < /path/to/SA2002-002-gzip.patch
# make cleandir dependall
# make install
* NetBSD 1.4, 1.4.1, 1.4.2, 1.4.3:
Systems running NetBSD 1.4, 1.4.1, 1.4.2 or 1.4.3 sources dated from
before 2002-01-16 should be upgraded from NetBSD 1.4.*
sources dated 2002-01-17 or later.
The following directories need to be updated from the
netbsd-1-4 CVS branch:
gnu/usr.bin/gzip
To update from CVS, re-build, and re-install gzip:
# cd src
# cvs update -d -P gnu/usr.bin/gzip
# cd gnu/usr.bin/gzip
# make cleandir dependall
# make install
Alternatively, apply the following patch (with potential offset
differences):
ftp://ftp.netbsd.org/pub/NetBSD/security/patches/SA2002-002-gzip.patch
To patch, re-build and re-install gzip(1):
# cd src/gnu/usr.bin/gzip
# patch < /path/to/SA2002-002-gzip.patch
# make cleandir dependall
# make install
Thanks To
=========
Jun-ichiro itojun Hagino for patches, and preparing advisory text.
Revision History
================
2002-03-12 Initial release
More Information
================
An up-to-date PGP signed copy of this release will be maintained at
ftp://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2002-002.txt.asc
Information about NetBSD and NetBSD security can be found at
http://www.NetBSD.ORG/ and http://www.NetBSD.ORG/Security/.
Copyright 2002, The NetBSD Foundation, Inc. All Rights Reserved.
$NetBSD: NetBSD-SA2002-002.txt,v 1.6 2002/03/12 05:45:35 groo Exp $
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (NetBSD)
Comment: For info see http://www.gnupg.org
iQCVAwUBPI4yDj5Ru2/4N2IFAQFJEQP/V2bfCwyBjhwcLifk7rxyBdU4ft2mX3K7
g7mdoD/Ljwe8xXAGb1HuxzdtKTIZGVbMBYqjDA6OwTjNn9V5Fzz8WZ/tGMwT+CTH
u5m09oEp2UOd7aSfGd+aIGZyjovFZEU7q+6iDln0wRk6vhQTC9y193wLAEK8ONDG
pkSXVUCmAPA=
=7p76
-----END PGP SIGNATURE-----