-----BEGIN PGP SIGNED MESSAGE-----

===========================================================================
              AUSCERT External Security Bulletin Redistribution
                             
              ESB-1999.029 -- NetBSD Security Advisory 1999-005
                   Security problem in lsof package fixed.
                                01 March 1999

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

The NetBSD Foundation, Inc. has released the following advisory concerning 
a buffer overflow vulnerability in the lsof package.  This vulnerability 
may allow local users to gain root access.

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


- -----BEGIN PGP SIGNED MESSAGE-----

                 NetBSD Security Advisory 1999-005
                 =================================

Topic:		Security problem in lsof package fixed.
Version:	Anything before lsof-4.40 without arg.c.patch applied.
Severity:	Local users may obtain root priviledge.


Abstract
========

Buffer overflow in lsof version 4.40 and prior where local users may
obtain root priviledge.  This package is available with the NetBSD
packages collection and is not installed by default.


Technical Details
=================

In http://www.hert.org/advisories/HERT-02.asc was reported:

When lsof is setuid-root or setgid kmem it is vulnerable to a buffer
overflow that will lead to direct root compromise or root compromise
through live kernel patching.


Solutions and Workarounds
=========================

As immediate workaround remove the setgid bit from lsof:

	chmod 0755 /usr/pkg/sbin/lsof

For a real solution NetBSD users should update pkgsrc/sysutils/lsof so
it contains:

Makefile:
     NetBSD: Makefile,v 1.13 1999/02/18 23:09:45 frueauf Exp

and rebuild/install the lsof package. This applies arg.c.patch
which was made available from the author of lsof:

MD5 (lsof/arg.c.patch) = 83fc82fe3c9917418934b964854b4590

This patch corrects a buffer overflow in the processing of -u option
login name values. Without this patch a login name longer than 9
characters can cause an internal buffer overflow and segmentation fault.


Thanks To
=========

Thanks go to Vic Abell <abe@purdue.edu> for providing arg.c.patch
on the lsof main site, HERT (http://www.hert.org/advisories/HERT-02.asc)
for announcing the advisory and Thorsten Frueauf <frueauf@netbsd.org>
for fixing lsof in the NetBSD packages collection.


Revision History
================
	1998/02/28 - fix the NetBSD RCS ID expansion in the Solutions
	and Workarounds section.


More Information
================

Information about NetBSD and NetBSD security can be found at
http://www.NetBSD.ORG/ and http://www.NetBSD.ORG/Security/.
Information about the NetBSD packages collection can be found at
http://www.NetBSD.ORG/Documentation/software/packages.html.


Copyright 1999, The NetBSD Foundation, Inc.  All Rights Reserved.

$NetBSD: NetBSD-SA1999-005.txt,v 1.3 1999/02/28 01:24:08 mrg Exp $

- -----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv

iQCVAwUBNtiaxT5Ru2/4N2IFAQGVAwP+Os4dKsKcuVdY6drKa7W9X2x0Z8xPKhmw
XE4uQ3DPeyOC6Twb4QW/lFvmidz4xKs0Qp4Ad6YKrwJ/4s8mdkbikSVaroNRCg7k
tHd9k/LPZdr1Lzm2BzeSqomDoqA12Njsbjpx4nmc+30eWgTD72HoFtdz4Bcw9RV/
40wm0pNOGEY=
=OHNG
- -----END PGP SIGNATURE-----
- --------------------------END INCLUDED TEXT--------------------

This security bulletin 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 use any or all of this information is
the responsibility of each user or organisation, and should be done so in
accordance with site policies and procedures.

NOTE: This is only the original release of the security bulletin.  It will
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the original authors to ensure that the information is still current.

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

Previous advisories and external security bulletins can be retrieved from:

	http://www.auscert.org.au/Information/advisories.html

If you believe that your system has been compromised, contact AusCERT or
your representative in FIRST (Forum of Incident Response and Security
Teams).

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 emergencies.


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: ftp://ftp.auscert.org.au/pub/auscert/AUSCERT_PGP.key

iQCVAwUBNuO2Jih9+71yA2DNAQHrqwP9FMJK/5KOs4JTfrQT0UfFor7H+TgrfsAK
uaOnPYZTAGj1ts851vgYigpAnIi4h7GuaqlRlO37E6ahOlK22PDsB3laJrgw4A3V
Ni/Bnn+/5bOBOpWt9LCV0DcCRNw6KoqV1RK2rh1da6w0+ZA9wdAPTNIHIszR3Gkx
tk1RawtJNWs=
=Ssq7
-----END PGP SIGNATURE-----