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

UNIRAS Brief - 282/06 - Four NetBSD Security Advisories:



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

- ----------------------------------------------------------------------------------
   UNIRAS (UK Govt CERT) Briefing Notice - 282/06 dated 13.04.06  Time: 10:30  
  UNIRAS is part of NISCC (National Infrastructure Security Co-ordination Centre)
- ---------------------------------------------------------------------------------- 
  UNIRAS material is also available from its website at www.uniras.gov.uk and
         Information about NISCC is available from www.niscc.gov.uk
- ----------------------------------------------------------------------------------

Title
=====

Four NetBSD Security Advisories:

1. 2006-009: False detection of Intel hardware RNG

2. 2006-011: IPSec replay attack

3. 2006-012: SIOCGIFALIAS ioctl may cause system crash

4. 2006-013: sysctl(3) local denial of service

Detail
====== 

1. The driver for Intel's random number generator may incorrectly detect the
presence of the device on some hardware.  This can lead to the driver
feeding a constant stream into the entropy pool.

2. A vulnerability was found in the fast_ipsec(4) stack that renders the 
IPSec anti-replay service ineffective under certain circumstances.

3. A system crash can occur if a user attempts to gather information on a
non-existent alias of a network interface via the SIOCGIFALIAS ioctl.

4. The user supplied buffer where results of the sysctl(3) call are stored is
locked into physical memory without checking its size.  This way, a malicious
user can cause a system lockup by allocating all available physical memory on
most systems.



1.



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


		 NetBSD Security Advisory 2006-009
		 =================================

Topic:		False detection of Intel hardware RNG

Version:	NetBSD-current:	source prior to February 19, 2006
		NetBSD 3.0:	affected
		NetBSD 2.1:	affected
		NetBSD 2.0.*:	affected
		NetBSD 2.0:	affected
		NetBSD 1.6.*:	affected
		NetBSD 1.6:	affected

Severity:	A constant stream is feed into the entropy pool

Fixed:		NetBSD-current:		February 19, 2006
		NetBSD-3-0 branch:	February 26, 2006	
						(3.0.1 will include the fix)
		NetBSD-3   branch:	February 26, 2006
		NetBSD-2-1 branch:	February 26, 2006
						(2.1.1 will include the fix)
		NetBSD-2-0 branch:	February 26, 2006
						(2.0.4 will include the fix)
		NetBSD-2   branch:	February 26, 2006
		NetBSD-1-6 branch:	February 26, 2006

Abstract
========

The driver for Intel's random number generator may incorrectly detect the
presence of the device on some hardware.  This can lead to the driver
feeding a constant stream into the entropy pool.

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

When Intel introduced the i8xx motherboard chipsets for x86 CPUs they also
released the 82802 chip called the "firmware hub". One of the features
provided by this chip is a hardware random number generator.

The NetBSD kernel provides a driver which uses this hardware random number
generator to collect entropy for the kernel random number generator, rnd(4).
This kernel random number generator is, among other things, used to provide
random input to applications which need to create cryptographic keys, e.g.
the SSH daemon or GnuPG.

However, some later Intel chipsets incorrectly report the presence of the
hardware RNG device, and the NetBSD driver unfortunately incorrectly
detected the chip in systems which didn't really have one. When this
happened a constant stream of bytes with the value 255 was fed into the
kernel random number generator.

Users relying on a falsely-attached 82802 chip as the sole randomness source
for rnd(4) may be at significant risk of poor-quality or highly predictable
output.  Such circumstances may arise on embedded-style systems without hard
disks or other common sources, or where the administrator has explicitly
disabled the other sources in the belief that the hardware RNG was superior
or sufficient.  This could therefore result in the use of predictable keys
for cryptography, disabling the expected protection.

Please refer to this web page for details:

  http://home.comcast.net/~andrex/hardware-RNG/doihave.html

Systems potentially affected meet the following conditions:
 - Using an Intel i8xx motherboard chipset for x86 CPUs
 - The kernel prints out "pchb0: random number generator enabled" during boot,
   additionally the device "pchb0" should show in the output from "rndctl -l".

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

The rndctl(8) command can be used to examine and control which sources
contribute to the rnd(4) randomness pool.  Using this command is it possible
to discover if the pchb0 device is contributing to the randomness pool, and
also to disable this input in an existing kernel if you suspect the 82802
device has been falsely detected.

In general, it is desirable to mix data from a wide range of sources into
the rnd(4) pool, and several types of devices are enabled by default,
including disks and user-input devices such as keyboards and mice. On some
hardware, none of these devices may exist or be used, and thus little or no
good-quality random data may be contributed to the pool.  Network devices
are disabled by default, but owners of such systems should consider enabling
them if no other sources are available.

To correct the false detection of Intel RNG hardware, 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 for any of
the netbsd-2, netbsd-2-0, netbsd-2-1, netbsd-3 or netbsd-3-0 branches:

        # cd src
        # cvs update -d -P sys/arch/i386/pci/pchb_rnd.c
	# ./build.sh kernel=KERNCONF
	# mv /netbsd /netbsd.old
	# cp sys/arch/ARCH/compile/obj/KERNCONF/netbsd /netbsd
	# shutdown -r now

To update from CVS, re-build, and re-install the kernel for 
the -current (a.k.a HEAD) branch:

        # cd src
        # cvs update -d -P sys/arch/x86/pci/pchb_rnd.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
=========

Matthias Scheler for reporting the bug and implementing the fixes.
Thor Lancelot Simon for initial identification and discussion of the issue.

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

	2006-04-12	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-009.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-009.txt,v 1.11 2006/04/12 22:09:50 adrianp Exp $

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

iQCVAwUBRD1+jD5Ru2/4N2IFAQIiZQQAunM8esJbsKmK6HngUuDS2wRhHCXiWR1t
/fnp1HZFR+oOaLAOru9YYNSM9JZCdGKs8JGn2QPkr5GE98sLOyqqquNlBJ0pxnCY
oNTi33UndMxIETapPZU7EnRsqhyDzF/0Xfy6egjhSVepIDVV8gSTnV0wnyFTAzB+
MJFjCsMcHTw=
=iCSI
- -----END PGP SIGNATURE-----


2.

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


		 NetBSD Security Advisory 2006-011
		 =================================

Topic:		IPSec replay attack

Version:	NetBSD-current:	source prior to March 23, 2006
		NetBSD 3.0:	affected
		NetBSD 2.1:	affected
		NetBSD 2.0.*:	affected
		NetBSD 2.0:	affected

Severity:	Systems could be vulnerable to a replay attack

Fixed:		NetBSD-current:		March 23, 2006
		NetBSD-3-0 branch:	March 28, 2006
						(3.0.1 will include the fix)
		NetBSD-3 branch:	March 28, 2006
		NetBSD-2-1 branch:	March 30, 2006
						(2.1.1 will include the fix)
		NetBSD-2-0 branch:	March 30, 2006
						(2.0.4 will include the fix)
		NetBSD-2 branch:	March 30, 2006


Abstract
========

A vulnerability was found in the fast_ipsec(4) stack that renders the 
IPSec anti-replay service ineffective under certain circumstances.

If the upper layer protocol doesn't provide any anti-packet replay
verification (for example, UDP) the system may be vulnerable to a 
replay attack.

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

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

The anti-replay service specifies an algorithm for preventing
injection of previously received packets from unknown parties
(the replay attack).

Due to a programming error in the fast_ipsec(4) stack, the Sequence
Number associated with a SA was not being updated, thus allowing
packets to bypass any sequence verification check.

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

The default configuration of NetBSD does not ship with FAST_IPSEC enabled.

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 -d -P sys/netipsec/xform_esp.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
=========

Pawel Jakub Dawidek is credited with the discovery of this issue
The FreeBSD Project for initial notification via FreeBSD-SA-06:11.ipsec
Rui Paulo for importing the fixes into NetBSD

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

	2006-04-12	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-011.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-011.txt,v 1.8 2006/04/12 22:53:07 adrianp Exp $

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

iQCVAwUBRD2E3j5Ru2/4N2IFAQKr/AP+KIHPPTfJQPSJLlZvvvUgapbaPMTWaC48
T2JwVcdQmxka8G36k/mKeI92Jenk63R557NEgtqUjEsDi+3862HcKQSXSd+Jzjfa
9Ec2ORyKlE/IRnsRtCb9NxjGqYg3I+ti8ENKs9lBqw4XJkcgDdkI0KJ8NWnKnD0f
Rz6FoeFdYgc=
=PLJl
- -----END PGP SIGNATURE-----


3.

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


		 NetBSD Security Advisory 2006-012
		 =================================

Topic:		SIOCGIFALIAS ioctl may cause system crash

Version:	NetBSD-current:	source prior to September 28, 2005
		NetBSD 3.0:	affected
		NetBSD 2.1:     affected
		NetBSD 2.0.*:   affected
		NetBSD 2.0:     affected
		NetBSD 1.6.*:   affected
		NetBSD 1.6:     affected

Severity:	Any local user can crash the system

Fixed:		NetBSD-current:		September 28, 2005
		NetBSD-3-0 branch:	April 02, 2006
						(3.0.1 will include the fix)
		NetBSD-3   branch:	April 02, 2006
		NetBSD-2-1 branch:	April 02, 2006
						(2.1.1 will include the fix)
		NetBSD-2-0 branch:	April 02, 2006
						(2.0.4 will include the fix)
		NetBSD-2 branch:	April 02, 2006
		NetBSD-1-6 branch:	April 02, 2006

Abstract
========

A system crash can occur if a user attempts to gather information on a
non-existent alias of a network interface via the SIOCGIFALIAS ioctl.

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

A NULL dereference occurs in the kernel when the alias in question
was not located, rather than returning an error.  A socket on the
local machine is required.

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 -d -P sys/netinet/in.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
=========

Sean Boudreau for PoC code and implementing the fixes.

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

	2006-04-12	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-012.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-012.txt,v 1.6 2006/04/12 22:09:50 adrianp Exp $

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

iQCVAwUBRD1+nD5Ru2/4N2IFAQJVdAQAqWpST2Mo4lvYBYAz7LNEpiknkUKjYeGg
M8Hp0OQXGLOf0A1fo/Tg4XuGgX7M38meelUpGpvfbMWqPg9AFZFV7JcKylQMnWFH
yRMNOJV1GV+25ZzT2pqxpPaGy+jleAW0Q6ZTNa4OsyCQztN8NS6AWMahTY5qmI/i
wojlqGVX1N8=
=B5UH
- -----END PGP SIGNATURE-----


4.


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


		 NetBSD Security Advisory 2006-013
		 =================================

Topic:		sysctl(3) local denial of service

Version:	NetBSD-current:	source prior to March 15, 2005
		NetBSD 3.0:	affected
		NetBSD 2.1:     affected
		NetBSD 2.0.*:   affected
		NetBSD 2.0:     affected
		NetBSD 1.6.*:	affected
		NetBSD 1.6:	affected

Severity:	Any local user can crash the system

Fixed:		NetBSD-current:		March 15, 2005
		NetBSD-3-0 branch:	March 24, 2006
						(3.0.1 will include the fix)
		NetBSD-3   branch:	March 24, 2006
		NetBSD-2-1 branch:      March 24, 2006
						(2.1.1 will include the fix)
		NetBSD-2-0 branch:      March 24, 2006
						(2.0.4 will include the fix)
		NetBSD-2 branch:        March 24, 2006

Abstract
========

The user supplied buffer where results of the sysctl(3) call are stored is
locked into physical memory without checking its size.  This way, a malicious
user can cause a system lockup by allocating all available physical memory on
most systems.

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

The system call implementing the sysctl(3) library call tries to lock the user
supplied result buffer into physical memory, to avoid the interferences of
information collection with other system activity.  The size of that buffer is
not checked against system limits.

The VM system checks whether the virtual address of the buffer is part of the
user address space, but since the amount of virtual memory a single user is
able to allocate exceeds the available physical memory on most systems, a
user can cause a system lockup by exhaustion of physical memory.

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 -d -P sys/kern/kern_sysctl.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
=========

Matthias Drochner for PoC code and implementing the fixes.

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

	2006-04-12	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-013.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-013.txt,v 1.4 2006/04/12 22:09:50 adrianp Exp $

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

iQCVAwUBRD1+pz5Ru2/4N2IFAQLhHQP+KDlJF7r1t8+8Wf/l8mOFIFW1d4us3AgK
zGdW7EkVjsWSz3YcYoA4uYyzBQeGSiNmiEvm1+R9Z1ZkAqTwD+KzYkOrGkfkAY3M
cVuaTKgOD3PfVHQhhaeE+krcRacjbnU1dwRQ6PQ3bnFJ73jOBCw5D7Q9z4gUuEb+
5q72TSbR1bc=
=4hNK
- -----END PGP SIGNATURE-----



- ----------------------------------------------------------------------------------

For additional information or assistance, please contact the HELP Desk by 
telephone or Not Protectively Marked information may be sent via 
EMail to: uniras@xxxxxxxxxxxx

Office Hours:
Mon - Fri: 08:30 - 17:00 Hrs
Tel: +44 (0) 870 487 0748 Ext 4511
Fax: +44 (0) 870 487 0749

Outside of Office Hours:
On Call Duty Officer:
Tel: +44 (0) 870 487 0748 and follow the prompts

- ----------------------------------------------------------------------------------
UNIRAS wishes to acknowledge the contributions of NetBSD for the information 
contained in this Briefing. 
- ----------------------------------------------------------------------------------
This Briefing contains the 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

iQCVAwUBRD4ZGYpao72zK539AQH4ngP9HUCPx2IXgwhKEsHd//Vii7ss0VnuO+s8
xmLaHTAqr1K1A31WHKI1ysDToSFCMP4LF96Nu0oSjJq02+8iAfOlV4rqByOsdXNA
3Ho0xI1GZ4mB8xsYASBKj9GDJ0/nveLUecW8AORZI6C9pNqgBl/IUFug+0ABdi3K
ON3FlR3If5g=
=ogpz
-----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 
______________________________________________________________________