Skip Navigation

  • Home
  • Contact us
  • FAQ
  • Glossary
  • Public key
  • Sitemap
  • Cymraeg
  • What's new
CPNI - Centre for the Protection of National Infastructure

Advanced search

  • About CPNI
  • The threats
  • Security planning
  • Methods of attack
  • Protecting your assets
  • Products and services
    • CSIRTUK advisories
      • Advisories archive
    • General protective security publications
    • InfoSec briefings
    • InfoSec technical notes
    • InfoSec vulnerability disclosures
    • Good practice guidelines
    • Viewpoints
    • Information exchanges
    • Risk Management Delivery Group
  • Research
Home > Products and services > CSIRTUK advisories > Advisories archive > November 2006 > 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

November 2006

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

ID: 00822
Ref: 779/2006
Date: 28 November 2006:13:37:41
Version: 1

Title: 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
Abstract:
Vendors affected: NetBSD
Operating systems affected: NetBSD
Applications affected: NetBSD

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-----
  • Accessibility |
  • Terms and conditions |
  • Privacy statement |
  • Data protection act |
  • Freedom of information |