Subject: NetBSD Security Advisory 1999-005
To: None <netbsd-announce@netbsd.org>
From: matthew green <mrg@eterna.com.au>
List: netbsd-announce
Date: 02/28/1999 12:03:34
-----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: NetBSD-SA1999-005.txt,v 1.1 1999/02/28 00:45:57 mrg 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.


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.1 1999/02/28 00:45:57 mrg Exp $

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

iQCVAwUBNtiStz5Ru2/4N2IFAQFxPQP8Cg6yqeJWCxoGrSDQBWahIYC6oJnZU3bV
K3jOJ5HeUkGcN1QViOITKdYPb3ADP/jF51gbWg63AAN4TFsE/aBWpxZKeFX5xrcO
GggA3lb/EbbgiS/DUMdEP5J8fAkuPDzPrMFEXiEkCWofACioNeHECtnmxX1J/Hta
ykjQZYAXWok=
=ACDA
-----END PGP SIGNATURE-----