[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UNIRAS Brief - 830/06 - Two NetBSD Security Advisories:



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

______________________________________________________________________________

 UNIRAS (UK Government CERT) Briefing - 830/06 dated 15.12.06 time 14:45
 UNIRAS is part of NISCC (the UK National Infrastructure Security
 Co-ordination Centre)
______________________________________________________________________________

 UNIRAS material is available from the NISCC website at www.niscc.gov.uk
______________________________________________________________________________

Title
=====

Two NetBSD Security Advisories:

1. 2006-027 - libc glob(3) buffer overflow

2. 20061214-1 - Kernel memory leakage in firewire interface

Detail
======

1. A flaw in glob(3) could potentially allow for the execution of untrusted code.
Currently the NetBSD ftp daemon that ships with the base distribution uses
glob(3) which has been found to be potentially vulnerable to attack.  In addition 
to this there may be other applications/network services which use glob(3) which 
are also potentially vulnerable.

2. A kernel memory disclosure bug has been found in the NetBSD firewire interface.



1.



- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


		 NetBSD Security Advisory 2006-027
		 =================================

Topic:		libc glob(3) buffer overflow

Version:	NetBSD-current:	source prior to September 13, 2005
		NetBSD 4.0_BETA2:	not affected
		NetBSD 3.1:		affected
		NetBSD 3.0.*:		affected
		NetBSD 3.0:		affected
		NetBSD 2.1:		affected
		NetBSD 2.0.*:		affected
		NetBSD 2.0:		affected
		pkgsrc:			20040810 and earlier

Severity:	Potential remote root for systems providing the ftpd service
		with a custom configuration.

Fixed:		NetBSD-current:		September 13, 2005
		NetBSD-3-0 branch:	December 2, 2006
		NetBSD-3 branch:	December 2, 2006
		NetBSD-2-1 branch:	December 2, 2006
		NetBSD-2-0 branch:	December 2, 2006
		NetBSD-2 branch:	December 2, 2006
		pkgsrc:  		tnftpd-20040810nb1 corrects this issue


Abstract
========

A flaw in glob(3) could potentially allow for the execution of untrusted code.
Currently the NetBSD ftp daemon that ships with the base distribution uses
glob(3) which has been found to be potentially vulnerable to attack.  In addition to this there may be other applications/network
services which use glob(3) which are also potentially vulnerable.

In the case of ftpd the server must be configured to allow remote users to create directories in order for attackers to exploit this
issue.


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

The limit computation of an internal buffer was done incorrectly.  The size of the buffer in byte was used as element count, even
though the elements of the buffer are 2 bytes long.  Long expanded path names would therefore overflow the buffer.


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

* Determining if you could be vulnerable (inetd):
By default ftpd is not enabled in the default install of NetBSD.
To confirm if the host in question is running ftpd, check the ftp entries in /etc/inetd.conf. By default, the entries look like
this:

#ftp	stream	tcp	nowait	root	/usr/libexec/ftpd	ftpd -ll
#ftp	stream	tcp6	nowait	root	/usr/libexec/ftpd	ftpd -ll

If the comment character (#) has been removed from the start of the lines, then ftpd has been enabled on this host. Hosts not
running ftpd are not vulnerable, but libc should be updated to prevent future exposure if ftpd is enabled at a later date.

* Disable ftpd (inetd):
As root, comment out the ftp lines in /etc/inetd.conf, and execute the following command to disable ftpd:

	% /etc/rc.d/inetd reload

* Determining if you could be vulnerable (standalone):
On NetBSD-current it is also possible to run ftpd in standalone mode by adding the following to rc.conf:

	ftpd=YES

If this entry exists then ftpd is being run in standalone mode.

* Disable ftpd (standalone):
As root, comment out the ftpd line in rc.conf, and execute the following command to disable ftpd:

	% /etc/rc.d/ftpd forcestop

* Limit directory creation:
Another possible workaround is to not allow remote users to create directories of their choice on the ftpd server.

* Directory names:
If you allow users to create directories of their own choice check for very long directory names.

* Drop root privileges:
As root, add -r to the command line options for any ftp entry in /etc/inetd.conf. Then run: 

	% /etc/rc.d/inetd reload 

This option may not be acceptable at all sites, since client compatibility issues are possible. See the ftpd(8) man page for more
details about -r.

The following instructions describe how to upgrade your libc binaries by updating your source tree and rebuilding and installing a
new version of libc.

* NetBSD-current:

	Systems running NetBSD-current dated from before 2005-09-13
	should be upgraded to NetBSD-current dated 2005-09-14 or later.

	The following files need to be updated from CVS HEAD:
		lib/libc/gen/glob.c

	To update from CVS, re-build, and re-install libc:

		# cd src
		# cvs update lib/libc/gen/glob.c
		# cd lib/libc
		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install

		# cd ../../libexec/ftpd
		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install


* NetBSD 3.*:

	Systems running NetBSD 3.* sources dated from before
	2006-12-02 should be upgraded from NetBSD 3.* sources dated
	2006-12-03 or later.

	The following files need to be updated from the
	netbsd-3, netbsd-3-0, netbsd-3-1 CVS branches:
		lib/libc/gen/__glob13.c

	To update from CVS, re-build, and re-install libc:

		# cd src
		# cvs update lib/libc/gen/__glob13.c
		# cd lib/libc
		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install

		# cd ../../libexec/ftpd
		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install


* NetBSD 2.*:

	Systems running NetBSD 2.* sources dated from before
	2006-12-02 should be upgraded from NetBSD 2.* sources dated
	2006-12-03 or later.

	The following files need to be updated from the
	netbsd-2, netbsd-2-0 or netbsd-2-1 CVS branches:
		lib/libc/gen/__glob13.c

	To update from CVS, re-build, and re-install libc:

		# cd src
		# cvs update lib/libc/gen/__glob13.c
		# cd lib/libc
		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install

		# cd ../../libexec/ftpd
		# make USETOOLS=no cleandir dependall
		# make USETOOLS=no install


Thanks To
=========

Tomas Skare for reporting this issue and the initial analysis.


Revision History
================

	2006-12-14	Initial release


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

Advisories may be updated as new information becomes available.
The most recent version of this advisory (PGP signed) can be found at
  ftp://ftp.NetBSD.org/pub/NetBSD/security/advisories/NetBSD-SA2006-027.txt.asc

Information about NetBSD and NetBSD security can be found at http://www.NetBSD.org/ and http://www.NetBSD.org/Security/.


Copyright 2006, The NetBSD Foundation, Inc.  All Rights Reserved.
Redistribution permitted only in full, unmodified form.

$NetBSD: NetBSD-SA2006-027.txt,v 1.4 2006/12/14 20:13:16 adrianp Exp $

- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)

iQCVAwUBRYGx2T5Ru2/4N2IFAQJbLAQAhHlwMkZdBnPhI2hFnp89DkfXvrDDQF8h
i0R4kO1BpLLFUmFfwNyQeNbRPLvfO6L5XNXMo03xAoXvbm/idhcIBXc14aysP1zG
g9HnRmthejogSI96KDtng/AWBWl3qMxIALTaOqe6uhQrYIqPbi+ITyKx3YB/gbO9
SJ28zBZQcQ0=
=4daO
- -----END PGP SIGNATURE-----



2.


- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


		NetBSD Security Note 20061214-1
		===============================

Topic:	    Kernel memory leakage in firewire interface

A kernel memory disclosure bug has been found in the NetBSD firewire interface.

This issue has been assigned CVE-2006-6013.

On the 15th of November 2006 a posting was made to a public list which detailed a "NetBSD all versions FireWire IOCTL kernel integer
overflow information disclousure."

http://www.securityfocus.com/archive/1/451637/30/0/threaded

The advisory listed "NetBSD all versions" as being affected.  Upon further investigation this was found not to be the case and there
are a number of other details that should be taken into account when trying to assess this issue:

* This issue impacts NetBSD-current before November 16 2006.  If
  you are running NetBSD-current sources after this date you have the
  fix included in the kernel.

* This issue impacts the NetBSD-4 branch before December 3, 2006.
  NetBSD 4.0_BETA2 contains the fix.

* No current NetBSD releases are impacted e.g. NetBSD 2* and NetBSD 3*.

* Although a complete list is not currently available we do not
  believe that all architectures are impacted by this bug.

* The fw nodes are not created by default in /dev in a NetBSD
  installation.

* When the fw* nodes are created using MAKEDEV, they are created with mode
  660 and ownership is set to root:operator.

We recommend that all users of NetBSD-current upgrade their sources to after November 16 2006.  In addition to this all users of
NetBSD-4 should update to sources after December 3 2006.


Thanks To
=========

Joerg Sonnenberger
Martin Husemann
Quentin Garnier
Elad Efrat
Jaromir Dolecek
Manuel Bouyer 


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

Information about NetBSD and NetBSD security can be found at http://www.NetBSD.org/ and http://www.NetBSD.org/Security/.

Copyright 2006, The NetBSD Foundation, Inc.  All Rights Reserved.
Redistribution permitted only in full, unmodified form.

$NetBSD: NetBSD-SN20061214-1.txt,v 1.1 2006/12/14 20:13:17 adrianp Exp $

- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)

iQCVAwUBRYGx5T5Ru2/4N2IFAQJVYAP/XLaRP8n1vvOZmiHUO153Eb0nNm5vWeRL
lEgOiIt3qor23fmyGmfz/ZjVTxMkIHeTICW29ie5W/2+sCn2ak863AInJysiGEoI
Hy9cCI6crmDYiCGRnz+pbkiKhFe7wwj/TjmTOPgEyd+P+5oPZAluFDhOx6bqmtsS
lw7s4sdYI6o=
=F0dl
- -----END PGP SIGNATURE-----


______________________________________________________________________________

NISCC values your feedback.

1. Which of the following most reflects the value of the briefing to you?
(Place an 'X' next to your choice)

Very useful:__ Useful:__ Not useful:__ 

2. If you did not find it useful, why not?


3. Any other comments? How could we improve our briefings?


Thank you for your contribution.
______________________________________________________________________________

For additional information or assistance, please contact our help desk
by telephone.  You may send Not Protectively Marked information via
e-mail to uniras@xxxxxxxxxxxxx

Office hours:

Mon - Fri: 08:30 - 17:00 hours
Tel: +44 (0) 870 487 0748 and follow the voice prompts
Fax: +44 (0) 870 487 0749

On-call duty officer outside office hours:
Tel: +44 (0) 870 487 0748 and follow the voice prompts

______________________________________________________________________________

UNIRAS wishes to acknowledge the contributions of NetBSD for the
information contained in this briefing.
______________________________________________________________________________

This notice contains information released by the original author.
Some of the information may have changed since it was released. If the
vulnerability affects you, it may be prudent to retrieve the advisory
from the site of the original source to ensure that you receive the most
current information concerning that problem.

Reference to any specific commercial product, process, or service by
trade name, trademark manufacturer, or otherwise, does not constitute or
imply its endorsement, recommendation, or favouring by UNIRAS or NISCC.
The views and opinions of authors expressed within this notice shall not
be used for advertising or product endorsement purposes.

Neither UNIRAS or NISCC shall also accept responsibility for any errors
or omissions contained within this briefing notice. In particular, they
shall not be liable for any loss or damage whatsoever, arising from or
in connection with the usage of information contained within this
notice.

UNIRAS is a member of the Forum of Incident Response and Security Teams
(FIRST) and has contacts with other international Incident Response
Teams (IRTs) in order to foster cooperation and coordination in incident
prevention, to prompt rapid reaction to incidents, and to promote
information sharing amongst its members and the community at large.
______________________________________________________________________________

<End of UNIRAS Briefing>

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.1

iQA/AwUBRYK1Vml7oeQsXfKvEQKLggCg8yw8ONZBOPiUFSAVfXgYVsfwHmsAn2Kv
qfcezXJLyjNiLfF2vlWeWvPm
=qKPg
-----END PGP SIGNATURE-----


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________