Share your story
The central voice for Linux and Open Source security news
Home News Topics Advisories HOWTOs Features Newsletters About Register

Sign up!
EnGarde Community
What is the most important Linux security technology?
Linux Events
Linux User Groups
Link to Us
Security Center
Book Reviews
Security Dictionary
Security Tips
White Papers
Featured Blogs
All About Linux
DanWalsh LiveJournal
Latest Newsletters
Linux Advisory Watch: February 27th, 2015
Linux Security Week: February 23rd, 2015
LinuxSecurity Newsletters
Choose Lists:
About our Newsletters
RSS Feeds
Get the LinuxSecurity news you want faster with RSS
Powered By

NetBSD-SA1999-006 umapfs problems Print E-mail
User Rating:      How can I rate this item?
Posted by Team   
NetBSD Security hole in umapfs

                 NetBSD Security Advisory 1999-006

Topic:          Security hole in umapfs
Version:        NetBSD 1.3.3 and prior; NetBSD-current until 19990312
Severity:       Local users can gain root privileges


Insufficient kernel checking in the umapfs virtual file system allows 
local users to remap their user id to any other user including the root 

umapfs is enabled in the default (GENERIC) kernel for the following ports:
amiga, arm32, atari, bebox, i386, mac68k, macppc, newsmips, next68k, 
next68k, ofppc, pmax, sparc, sparc64, vax, x68k.  

The alpha, hp300, mvme68k, pc532 and sun3 ports do not include umapfs 
by default.

Technical Details

umapfs creates a null layer, duplicating a sub-tree of the file system
name space under another part of the global file system, with uid/gid
remapping.  The uid and gid mappings are described in two files supplied
by the user to mount_umap(8).

When a umapfs mount is attempted, no additional checks are done in the
kernel other than the usual checks: the user must be root, or have read
access of the target and be owner of the mount point.  The only
permission checks made were erroneously placed in the mount_umap(8)
command.  A malicious user can compile their own mount_umap binary that
does not include these checks.  With this modified mount_umap a user
can mount any directory on another directory they have write access to
with their uid mapped to 0.  They will then have be able to create and
modify root owned files in the source directory, including the ability
to create setuid root binaries.

Solution and Workarounds

A patch is available for the NetBSD 1.3.3 which restricts umapfs mounts
to root and fixes the above problem.  You may find this patch on the
NetBSD ftp server:


NetBSD-current since 19990312 is not vulnerable.  Users of NetBSD-current
should upgrade to a source tree later than 19990312.

If neither of the above can be performed, a simple work around is to
remove umapfs from your kernel configuration and rebuild a kernel.
For this you need to remove or comment out the line:

        file-system     UMAPFS          # NULLFS + uid and gid remapping

in the configuration file.  See these URL's for documentation building
a NetBSD kernel:


Thanks To

Thanks go to Manuel Bouyer  for the discovery
and solution for this problem.

Revision History
        1999/03/17 - initial version

More Information

Information about NetBSD and NetBSD security can be found at
http://www.NetBSD.ORG/ and http://www.NetBSD.ORG/Security/.

Copyright 1999, The NetBSD Foundation, Inc.  All Rights Reserved.

$NetBSD: NetBSD-SA1999-006.txt,v 1.5 1999/03/17 12:15:13 mrg Exp $

Version: 2.6.3ia
Charset: noconv

< Prev   Next >


Latest Features
Peter Smith Releases Linux Network Security Online
Securing a Linux Web Server
Password guessing with Medusa 2.0
Password guessing as an attack vector
Squid and Digest Authentication
Squid and Basic Authentication
Demystifying the Chinese Hacking Industry: Earning 6 Million a Night
Free Online security course (LearnSIA) - A Call for Help
What You Need to Know About Linux Rootkits
Review: A Practical Guide to Fedora and Red Hat Enterprise Linux - Fifth Edition
Yesterday's Edition
CSI: Cyber: We Watched So You Didnít Have To
PATCH FREAK NOW: Cloud providers faulted for slow response
Partner Sponsor

Community | HOWTOs | Blogs | Features | Book Reviews | Networking
 Security Projects |  Latest News |  Newsletters |  SELinux |  Privacy |  Home
 Hardening |   About Us |   Advertise |   Legal Notice |   RSS |   Guardian Digital
(c)Copyright 2015 Guardian Digital, Inc. All rights reserved.