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

UNIRAS Brief - 779/06 - Three NetBSD Security Advisories:



______________________________________________________________________________

 UNIRAS (UK Government CERT) Briefing - 779/06 dated 28.11.06 time 13:30
 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
=====


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

Three NetBSD Security Advisories:

1. 2006-024: systrace(4) integer overflow

2. 2006-025: Multiple information/memory leakage issues

3. 2006-026: Multiple denial of service issues

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

iQA/AwUBRWw5gml7oeQsXfKvEQJCDACggkdvEPMsbO6i/+raYcagbfoRav4AoMyk
NLAiraTkjrqPKGqe2Zsf68/s
=M5Tl
-----END PGP SIGNATURE-----

Detail
======

1. A check for integer overflow is missing in the kernel component of systrace.
The problem is located in the "systrace_preprepl()" function.
The vulnerability can be triggered by passing a large (or negative) integer
value to a systrace ioctl().

2. A userspace parameter passed to the ptrace(2) call involving a PT_LWPINFO 
request can result in a memory/information leak.

3. If a user supplies a bad 'name' or 'namelen' parameter to accept(2) this
could leave a dangling socket.  If bad parameters were supplied and a 
copyout(9) failed, the 'file' structure was cleaned up, but not the 
associated socket.  This could leave sockets in the CLOSE_WAIT state that 
could never be closed.




1.



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


		 NetBSD Security Advisory 2006-024
		 =================================

Topic:		systrace(4) integer overflow

Version:	NetBSD-current:	source prior to October 6, 2006
		NetBSD 3.1:		not affected
		NetBSD 3.0.2:		not affected
		NetBSD 3.0.1:		affected
		NetBSD 3.0:		affected
		NetBSD 2.1:		affected
		NetBSD 2.0.*:		affected
		NetBSD 2.0:		affected

Severity:	Local privilege escalation and denial of service

Fixed:		NetBSD-current:		October 6, 2006
		NetBSD-3-0 branch:	October 16, 2006
		NetBSD-3 branch:	October 16, 2006
		NetBSD-2-1 branch:	November 19, 2006
		NetBSD-2-0 branch:	November 19, 2006
		NetBSD-2 branch:	November 19, 2006


Abstract
========

An integer overflow in systrace(4) can potentially lead to a local
denial of service and/or privilege escalation.

This vulnerability has been assigned CVE reference CVE-2006-5218.


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

A check for integer overflow is missing in the kernel component of systrace.
The problem is located in the "systrace_preprepl()" function.
The vulnerability can be triggered by passing a large (or negative) integer
value to a systrace ioctl().


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

A possible solution is to disable systrace by commenting out the 
"options SYSTRACE" line in your kernel configuration file.  You
will need to re-compile and install the new kernel for the change
to become effective on reboot.

For all NetBSD versions, you need to obtain fixed kernel sources,
rebuild and install the new kernel, and reboot the system.
                                      
The fixed source may be obtained from the NetBSD CVS repository.

The following instructions briefly summarise how to upgrade your
kernel.  In these instructions, replace:

  ARCH     with your architecture (from uname -m), and
  KERNCONF with the name of your kernel configuration file.

To update from CVS, re-build, and re-install the kernel:

	# cd src
	# cvs update sys/sys/systrace.h \
	 	sys/kern/kern_systrace.c
	# ./build.sh kernel=KERNCONF
	# mv /netbsd /netbsd.old
	# cp sys/arch/ARCH/compile/obj/KERNCONF/netbsd /netbsd
	# shutdown -r now

For more information on how to do this, see:

   http://www.NetBSD.org/guide/en/chap-kernel.html


Thanks To
=========

Chris Evans is credited with the discovery of this issue.

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

	2006-11-27	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-024.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-024.txt,v 1.3 2006/11/27 20:14:45 adrianp Exp $

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

iQCVAwUBRWtHZT5Ru2/4N2IFAQJREgQAv2ziIkNkoC71h8UO9FCAgCUzpAhICaOL
EOew/96bisODCRizrgKKGv8nJlv7RYYP2kPtoxkpJOGR1cdz7MBhUXuKha9iGJtc
yOxssieab1ufvr6VA4Y2GZib5yuREqcPLT9/CZ826yjf7fex2Qiaj7dOa+MxAqI3
ip5GTQ7tBow=
=cRJw
-----END PGP SIGNATURE-----



2.


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


		 NetBSD Security Advisory 2006-025
		 =================================

Topic:		Multiple information/memory leakage issues

Version:	NetBSD-current:	source prior to October 27, 2006
		NetBSD 3.1:		not affected
		NetBSD 3.0.2:		not affected
		NetBSD 3.0.1:		affected
		NetBSD 3.0:		affected
		NetBSD 2.1:		affected
		NetBSD 2.0.*:		affected
		NetBSD 2.0:		affected

Severity:	Information/memory leakage.

Fixed:		NetBSD-current:		October 27, 2006
		NetBSD-3-0 branch:	October 27, 2006
		NetBSD-3 branch:	October 27, 2006
		NetBSD-2-1 branch:	November 19, 2006
		NetBSD-2-0 branch:	November 19, 2006
		NetBSD-2 branch:	November 19, 2006


Abstract
========

There are multiple information/memory leakage issues present in the 
NetBSD kernel.


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

* ptrace memory/information leak
A userspace parameter passed to the ptrace(2) call involving a PT_LWPINFO 
request can result in a memory/information leak.

* if_clone_list() information leak
There is a minor kernel memory disclose in if_clone_list() where up to 
IFNAMSIZ bytes of uninitialized stack memory are copied out to userland.


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

For all NetBSD versions, you need to obtain fixed kernel sources,
rebuild and install the new kernel, and reboot the system.
                                      
The fixed source may be obtained from the NetBSD CVS repository.

The following instructions briefly summarise how to upgrade your
kernel.  In these instructions, replace:

  ARCH     with your architecture (from uname -m), and
  KERNCONF with the name of your kernel configuration file.

To update from CVS, re-build, and re-install the kernel:

	# cd src
	# cvs update sys/kern/sys_process.c \
	 	sys/net/if.c
	# ./build.sh kernel=KERNCONF
	# mv /netbsd /netbsd.old
	# cp sys/arch/ARCH/compile/obj/KERNCONF/netbsd /netbsd
	# shutdown -r now

For more information on how to do this, see:

   http://www.NetBSD.org/guide/en/chap-kernel.html


Thanks To
=========

The ptrace memory/information leak was discovered and reported by
 Ben Hawkes of Suresec Pty. Ltd.
The if_clone_list() information leak was discovered and reported by
 Christer Oberg of BitSec.


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

	2006-11-27	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-025.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-025.txt,v 1.3 2006/11/27 20:14:45 adrianp Exp $

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

iQCVAwUBRWtHbD5Ru2/4N2IFAQLqmwQAiydDKN/hHiglMPLeQM1zqy6wYaveFRuX
asRbY0ORI1wWuNToFyo0u5iECejz21resTwOhvEOALlE6cvWAqfCf1Ss20s4NxMO
QzjZeqtk82eny8nQBeRT7wplVNlyb3H7OVFXC3gqsNfJf1QmP6LsZKblxSp9sTbm
1p/gELMVM6k=
=lqik
-----END PGP SIGNATURE-----



3.


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


		 NetBSD Security Advisory 2006-026
		 =================================

Topic:		Multiple denial of service issues

Version:	NetBSD-current:	source prior to October 23, 2006
		NetBSD 3.1:		not affected
		NetBSD 3.0.2:		not affected
		NetBSD 3.0.1:		affected
		NetBSD 3.0:		affected
		NetBSD 2.1:		affected
		NetBSD 2.0.*:		affected
		NetBSD 2.0:		affected

Severity:	Denial of service issues ranging from resource leaks to
		kernel panics.

Fixed:		NetBSD-current:		October 23, 2006
		NetBSD-3-0 branch:	October 24, 2006
		NetBSD-3 branch:	October 24, 2006
		NetBSD-2-1 branch:	October 29, 2006
		NetBSD-2-0 branch:	October 29, 2006
		NetBSD-2 branch:	October 29, 2006


Abstract
========

There are multiple denial of service issues that can result in resource
leaks or kernel panics.


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

* Dangling socket could exhaust local system resources
If a user supplies a bad 'name' or 'namelen' parameter to accept(2) this
could leave a dangling socket.  If bad parameters were supplied and a 
copyout(9) failed, the 'file' structure was cleaned up, but not the 
associated socket.  This could leave sockets in the CLOSE_WAIT state that 
could never be closed.

* sendmsg(2) panic
On 64-bit architectures (e.g. amd64, sparc64, and alpha) sendmsg(2) 
can cause a kernel panic, due to insufficient checks of the 'msg_controllen'
parameter in sendit().

* mount_procfs panic (with -o linux)
Trying to read '/emul/linux/proc/0/stat' on a procfs mounted with the 'linux'
option results in a kernel panic.  The process in question has to no parent
process, resulting in a NULL dereference due to insufficient checks.

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

* The sendmsg(2) panic only affects 64-bit systems.

* By default, procfs is not mounted with the 'linux' option, however it is
  often enabled when using Linux emulation.

For all NetBSD versions, you need to obtain fixed kernel sources,
rebuild and install the new kernel, and reboot the system.
                                      
The fixed source may be obtained from the NetBSD CVS repository.

The following instructions briefly summarise how to upgrade your
kernel.  In these instructions, replace:

  ARCH     with your architecture (from uname -m), and
  KERNCONF with the name of your kernel configuration file.

To update from CVS, re-build, and re-install the kernel:

	# cd src
	# cvs update sys/kern/uipc_syscalls.c \
	 	sys/miscfs/procfs/procfs_linux.c
	# ./build.sh kernel=KERNCONF
	# mv /netbsd /netbsd.old
	# cp sys/arch/ARCH/compile/obj/KERNCONF/netbsd /netbsd
	# shutdown -r now

For more information on how to do this, see:

   http://www.NetBSD.org/guide/en/chap-kernel.html


Thanks To
=========

The dangling socket issue was discovered and fixed by Sean Boudreau.
The sendmsg(2) panic was discovered and reported by Ryo Shimizu.
The mount_procfs panic was discovered and reported Nicolas Joly.

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

	2006-11-27	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-026.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-026.txt,v 1.3 2006/11/27 20:14:45 adrianp Exp $

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

iQCVAwUBRWtHcj5Ru2/4N2IFAQI/BgP/QedMEaSiqw9Enjc4IO7fGPH5Y6+VU640
MM3pdUqi7M2wY0lIG2pQgooCwJskt//Ei0mSGNnmUXowLa0aAmbtiyegptmv5bKR
bzPUGAjDhL0/VPKp6SUFeSp+9cdjXytuisqsJJCXdcRZx1vfMnaV6CVbWExAMWwF
YuX+hqClHCY=
=z6tu
-----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>


______________________________________________________________________
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 
______________________________________________________________________