SecurityTracker.com
Keep Track of the Latest Vulnerabilities
with SecurityTracker!
    Home    |    View Topics    |    Search    |    Contact Us    |   

SecurityTracker
Archives


 
Sign Up
Sign Up for Your FREE Weekly SecurityTracker E-mail Alert Summary
Instant Alerts
Buy our Premium Vulnerability Notification Service to receive customized, instant alerts
Affiliates
Put SecurityTracker Vulnerability Alerts on Your Web Site -- It's Free!
Partners
Become a Partner and License Our Database or Notification Service
Report a Bug
Report a vulnerability that you have found to SecurityTracker
bugs
@
securitytracker.com






Category:   OS (UNIX)  >   FreeBSD Kernel Vendors:   FreeBSD
FreeBSD nmount(2) Bug Lets Local Users Gain Elevated Privileges
SecurityTracker Alert ID:  1020816
SecurityTracker URL:  http://securitytracker.com/id/1020816
CVE Reference:   CVE-2008-3531   (Links to External Site)
Date:  Sep 4 2008
Impact:   Execution of arbitrary code via local system, Root access via local system
Fix Available:  Yes  Vendor Confirmed:  Yes  
Version(s): 7.0
Description:   A vulnerability was reported in the FreeBSD nmount(2) system call. A local user can obtain elevated privileges on the target system.

If the system is configured to allow unprivileged local users to mount file systems, a local user can invoke nmount(2) to execute arbitrary code on the target system with kernel-level privileges.

James Gritton reported this vulnerability.

Impact:   A local user can obtain kernel level privileges on the target system.
Solution:   The vendor has issued a fix and has provided the following solution instructions [quoted]:

Perform one of the following:

1) Upgrade your vulnerable system to 7-STABLE, or to the RELENG_7_0
security branch dated after the correction date.

2) To patch your present system:

The following patches have been verified to apply to FreeBSD 7.0 systems.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

# fetch http://security.FreeBSD.org/patches/SA-08:08/nmount.patch
# fetch http://security.FreeBSD.org/patches/SA-08:08/nmount.patch.asc

b) Apply the patch.

# cd /usr/src
# patch < /path/to/patch

c) Recompile your kernel as described in
<URL:http://www.FreeBSD.org/handbook/kernelconfig.html> and reboot the
system.

The vendor's advisory is available at:

http://security.freebsd.org/advisories/FreeBSD-SA-08:08.nmount.asc

Vendor URL:  security.freebsd.org/advisories/FreeBSD-SA-08:08.nmount.asc (Links to External Site)
Cause:   Access control error
Underlying OS:  

Message History:   None.


 Source Message Contents

Date:  Wed, 3 Sep 2008 20:13:13 GMT
Subject:  FreeBSD Security Advisory FreeBSD-SA-08:08.nmount

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

=============================================================================
FreeBSD-SA-08:08.nmount                                     Security Advisory
                                                          The FreeBSD Project

Topic:          nmount(2) local arbitrary code execution

Category:       core
Module:         sys_kern
Announced:      2008-09-03
Credits:        James Gritton
Affects:        FreeBSD 7.0-RELEASE, FreeBSD 7.0-STABLE
Corrected:      2008-09-03 19:09:47 UTC (RELENG_7, 7.1-PRERELEASE)
                2008-09-03 19:09:47 UTC (RELENG_7_0, 7.0-RELEASE-p4)
CVE Name:       CVE-2008-3531

For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit <URL:http://security.FreeBSD.org/>.

I.   Background

The mount(2) and nmount(2) system calls are used by various utilities
in the base system to graft a file system object on to the file system
tree to a given mount point.  It is possible to allow unprivileged
users to utililize these system calls by setting the vfs.usermount
sysctl(8) variable.

II.  Problem Description

Various user defined input such as mount points, devices, and mount
options are prepared and passed as arguments to nmount(2) into the
kernel.  Under certain error conditions, user defined data will be
copied into a stack allocated buffer stored in the kernel without
sufficient bounds checking.

III. Impact

If the system is configured to allow unprivileged users to mount file
systems, it is possible for a local adversary to exploit this
vulnerability and execute code in the context of the kernel.

IV.  Workaround

It is possible to work around this issue by allowing only privileged
users to mount file systems by running the following sysctl(8)
command:

# sysctl vfs.usermount=0

V.   Solution

NOTE WELL: Even with this fix allowing users to mount arbitrary media
should not be considered safe.  Most of the file systems in FreeBSD
was not built to protect safeguard against malicious devices.  While
such bugs in file systems are fixed when found, a complete audit has
not been perfomed on the file system code.

Perform one of the following:

1) Upgrade your vulnerable system to 7-STABLE, or to the RELENG_7_0
security branch dated after the correction date.

2) To patch your present system:

The following patches have been verified to apply to FreeBSD 7.0 systems.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

# fetch http://security.FreeBSD.org/patches/SA-08:08/nmount.patch
# fetch http://security.FreeBSD.org/patches/SA-08:08/nmount.patch.asc

b) Apply the patch.

# cd /usr/src
# patch < /path/to/patch

c) Recompile your kernel as described in
<URL:http://www.FreeBSD.org/handbook/kernelconfig.html> and reboot the
system.

VI.  Correction details

The following list contains the revision numbers of each file that was
corrected in FreeBSD.

Branch                                                           Revision
  Path
- -------------------------------------------------------------------------
RELENG_7
  src/sys/kern/vfs_mount.c                                     1.265.2.10
RELENG_7_0
  src/UPDATING                                              1.507.2.3.2.8
  src/sys/conf/newvers.sh                                    1.72.2.5.2.8
  src/sys/kern/vfs_mount.c                                  1.265.2.1.2.2
- -------------------------------------------------------------------------

VII. References

http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-3531

The latest revision of this advisory is available at
http://security.FreeBSD.org/advisories/FreeBSD-SA-08:08.nmount.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iD8DBQFIvu2eFdaIBMps37IRAl9BAJ9Jnp+agN06pBkzPDwEnOT83MNd6QCghOFX
yvNI1gVmhAQ7MXOUvPoLcLk=
=EsCn
-----END PGP SIGNATURE-----

 
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us

Copyright 2014, SecurityGlobal.net LLC