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

Welcome!
Sign up!
EnGarde Community
Login
Polls
What is the most important Linux security technology?
 
Advisories
Community
Linux Events
Linux User Groups
Link to Us
Security Center
Book Reviews
Security Dictionary
Security Tips
SELinux
White Papers
Featured Blogs
All About Linux
DanWalsh LiveJournal
Securitydistro
Latest Newsletters
Linux Advisory Watch: November 21st, 2014
Linux Security Week: November 17th, 2014
Subscribe
LinuxSecurity Newsletters
E-mail:
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 LinuxSecurity.com Team   
NetBSD Security hole in umapfs
-----BEGIN PGP SIGNED MESSAGE-----

                 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


Abstract
========

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

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:

    ftp://ftp.NetBSD.ORG/pub/NetBSD/misc/security/patches/19990311-umapfs

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:

   
http://www.NetBSD.ORG/Documentation/kernel/index.html#downloading_kernel_source
    http://www.NetBSD.ORG/Documentation/kernel/index.html#building_a_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 $

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: noconv

iQCVAwUBNu+dHj5Ru2/4N2IFAQFN0QP/Sh1Mhp0ArrA+t8MZCk1GknizFM0CFgWC
TUv0aO/P7OueAcHVCFM6j8gHvECBvwRh4Gxli0iRRGA1NfmW0Z5Kt8CKdaZ5d4JO
KUAmZeL8Jd95vr3j8bxUHM3ZSsWHOd5U3B3AZIlhvVacs9FjmMd/DhKYAnY+N+3P
oWslFh5Cgnk=
=QQZM
-----END PGP SIGNATURE-----
 
< Prev   Next >
    
Partner

 

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
Google Releases Open Source Tool for Testing Web App Security Scanners
Most Targeted Attacks Exploit Privileged Accounts
NotCompable sets new standards for mobile botnet sophistication
Hands on with Caine Linux: Pentesting and UEFI compatible
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 2014 Guardian Digital, Inc. All rights reserved.