April 2006
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
ID: 00283
Ref: 282/2006
Date: 13 April 2006:10:31:14
Version: 1
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
Abstract:
Vendors affected: NetBSD
Operating systems affected: NetBSD
Applications affected: NetBSD
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-----