NetBSD-Announce archive

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

NetBSD Security Advisory 2010-001: File system module autoloading Denial of Service attack

Hash: SHA1

                 NetBSD Security Advisory 2010-001

Topic:          File system module autoloading Denial of Service attack

Version:        NetBSD-current:         affected prior to 2009-12-19 20:28:27 
                NetBSD 5.0.1:           affected
                NetBSD 5.0:             affected
                NetBSD 4.0.*:           not affected
                NetBSD 4.0:             not affected

Severity:       Local Denial of Service

Fixed:          NetBSD-current:         Dec 19, 2009
                NetBSD-5-0 branch:      Dec 21, 2009
                NetBSD-5 branch:        Dec 21, 2009

Please note that NetBSD releases prior to 4.0 are no longer supported.
It is recommended that all users upgrade to a supported release.


A coding error in the NetBSD VFS code allows a local attacker to
crash the local system by passing a soon-to-be-unmapped pointer
as a file system name to the mount system call.

Technical Details

When entering the mount_get_vfsops() function, the string "fstype",
containing the file system name, is first copied from userspace into the
kernel address space variable "fstypename". Upon invocation of the file
system kernel module autoloader, however, the module_autoload() function
was passed the "fstype" variable, which points to userspace memory.

If a pointer passed to the mount system call as the file system name is
unmapped before being used by the module autoloader, the module autoloader
will access unmapped memory, causing an unresolvable page fault in kernel
space and subsequently a kernel panic.

The same occurrs unconditionally on architectures with completely separate
kernel and user address spaces.

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/vfs_syscalls.c
        # ./ 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:

Thanks To

Martin Husemann for finding and reporting the vulnerability, and for
developing a patch for it.

Revision History

        2010-01-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

Information about NetBSD and NetBSD security can be found at and

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

$NetBSD: NetBSD-SA2010-001.txt,v 1.1 2010/01/12 20:11:04 tonnerre Exp $
Version: GnuPG v1.4.10 (NetBSD)


Home | Main Index | Thread Index | Old Index