Sign Up for Your FREE Weekly SecurityTracker E-mail Alert Summary
|
|
|
|
|
|
|
Put SecurityTracker Vulnerability Alerts on Your Web Site -- It's Free!
|
|
|
|
Become a Partner and License Our Database or Notification Service
|
|
|
|
|
|
|
|
|
|
|
|
|
(Gentoo Issues Fix) Linux Kernel do_mremap() Fails to Check do_munmap() Return Values, Allowing a Local User to Gain Root Privileges
|
|
SecurityTracker Alert ID: 1009342 |
|
SecurityTracker URL: http://securitytracker.com/id/1009342
|
|
CVE Reference:
CAN-2004-0077
(Links to External Site)
|
Date: Mar 8 2004
|
Impact:
Execution of arbitrary code via local system, Root access via local system
|
Fix Available: Yes Vendor Confirmed: Yes
|
|
Description:
Another vulnerability was reported in the Linux kernel do_mremap() function. A local user can execute arbitrary code with root privileges.
Paul Starzetz discovered and reported that there is a missing return value check within the mremap(2) system call.
When resizing or moving virtual memory areas, the function reportedly does not test the return value of the do_munmap() function. Cases where the function fails (for example, due to the number of virtual memory areas being exceeded by the calling process) will not be properly detected, according to the report. As a result, the kernel may move memory belonging to one process into memory space that is allocated to another process.
Some other calls to the do_munmap() function are also not checked, the report said.
A local user can gain root privileges on the target system.
The original advisory is available at:
http://isec.pl/vulnerabilities/isec-0014-mremap-unmap.txt
|
Impact:
A local user can gain root privileges on the target system.
|
Solution:
Gentoo has released a fix. See the Source Messages for a list of affected packages and for instructions on how to update your kernel.
|
Vendor URL: www.kernel.org/ (Links to External Site)
|
Cause:
Boundary error
|
Underlying OS:
|
|
Message History:
This archive entry is a follow-up to the message listed below.
|
Source Message Contents
|
Date: Sat, 06 Mar 2004 23:40:27 +0000
Subject: [gentoo-announce] [ GLSA 200403-02 ] Linux kernel do_mremap local privilege escalation
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Gentoo Linux Security Advisory GLSA 200403-02
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
~ http://security.gentoo.org
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
~ Severity: High
~ Title: Linux kernel do_mremap local privilege escalation
~ vulnerability
~ Date: March 06, 2004
~ Bugs: #42024
~ ID: 200403-02
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Synopsis
========
A critical security vulnerability has been found in recent Linux
kernels by Paul Starzetz of iSEC Security Research which allows for
local privilege escalations.
Background
==========
The Linux kernel is responsible for memory management in a working
system - to allow this, processes are allowed to allocate and
unallocate memory.
Affected packages
=================
~ -------------------------------------------------------------------
~ Kernel / Unaffected Version / Manual Update?
~ -------------------------------------------------------------------
~ aa-sources................2.4.23-r1...................YES..........
~ alpha-sources.............2.4.21-r4................................
~ ck-sources................2.4.24-r1...................YES..........
~ ck-sources................2.6.2-r1....................YES..........
~ compaq-sources............2.4.9.32.7-r2............................
~ development-sources.......2.6.3_rc1................................
~ gaming-sources............2.4.20-r8................................
~ gentoo-dev-sources........2.6.3_rc1................................
~ gentoo-sources............2.4.19-r11...............................
~ gentoo-sources............2.4.20-r12...............................
~ gentoo-sources............2.4.22-r7................................
~ grsec-sources.............2.4.24.1.9.13-r1.........................
~ gs-sources................2.4.25_pre7-r2...........................
~ hardened-sources..........2.4.24-r1................................
~ hppa-dev-sources..........2.6.2_p3-r1..............................
~ hppa-sources..............2.4.24_p0-r1.............................
~ ia64-sources..............2.4.24-r1................................
~ mips-prepatch-sources.....2.4.25_pre6-r1...........................
~ mips-sources..............2.4.25_rc4...............................
~ mm-sources................2.6.3_rc1-r1.............................
~ openmosix-sources.........2.4.22-r4................................
~ pac-sources...............2.4.23-r3................................
~ planet-ccrma-sources......2.4.21-r5................................
~ ppc-development-sources...2.6.3_rc1-r1.............................
~ ppc-sources...............2.4.24-r1................................
~ ppc-sources-benh..........2.4.22-r5................................
~ ppc-sources-crypto........2.4.20-r3................................
~ ppc-sources-dev...........2.4.24-r2................................
~ selinux-sources...........2.4.24-r2................................
~ sparc-dev-sources.........2.6.3_rc1................................
~ sparc-sources.............2.4.24-r2................................
~ usermode-sources..........2.4.24-r1................................
~ usermode-sources..........2.6.3-r1.................................
~ vanilla-prepatch-sources..2.4.25_rc4...............................
~ vanilla-sources...........2.4.25...................................
~ win4lin-sources...........2.4.23-r2................................
~ win4lin-sources...........2.6.2-r1.................................
~ wolk-sources..............4.9-r4...................................
~ wolk-sources..............4.10_pre7-r3.............................
~ xfs-sources...............2.4.24-r2................................
~ IMPORTANT: IF YOUR KERNEL IS MARKED AS "YES" ABOVE, THEN YOU SHOULD
~ UPDATE YOUR KERNEL EVEN IF PORTAGE REPORTS THAT THE SAME
~ VERSION IS INSTALLED.
Description
===========
The memory subsystem allows for shrinking, growing, and moving of
chunks of memory along any of the allocated memory areas which the
kernel posesses.
To accomplish this, the do_mremap code calls the do_munmap() kernel
function to remove any old memory mappings in the new location - but,
the code doesn't check the return value of the do_munmap() function
which may fail if the maximum number of available virtual memory area
descriptors has been exceeded.
Due to the missing return value check after trying to unmap the middle
of the first memory area, the corresponding page table entries from
the second new area are inserted into the page table locations
described by the first old one, thus they are subject to page
protection flags of the first area. As a result, arbitrary code can be
executed.
Impact
======
Arbitrary code with normal non-superuser privelerges may be able to
exploit this vulnerability and may disrupt the operation of other
parts of the kernel memory management subroutines finally leading to
unexpected behavior.
Since no special privileges are required to use the mremap() and
mummap() system calls any process may misuse this unexpected behavior
to disrupt the kernel memory management subsystem. Proper exploitation
of this vulnerability may lead to local privilege escalation allowing
for the execution of arbitrary code with kernel level root access.
Proof-of-concept exploit code has been created and successfully
tested, permitting root escalation on vulnerable systems. As a result,
all users should upgrade their kernels to new or patched versions.
Workaround
==========
Users who are unable to upgrade their kernels may attempt to use "sysctl
- -w vm.max_map_count=1000000", however, this is a temporary fix which
only solves the problem by increasing the number of memory areas that
can be created by each process. Because of the static nature of this
workaround, it is not recommended and users are urged to upgrade their
systems to the latest avaiable patched sources.
Resolution
==========
Users are encouraged to upgrade to the latest available sources for
their system:
~ # emerge sync
~ # emerge -pv your-favourite-sources
~ # emerge your-favourite-sources
~ # # Follow usual procedure for compiling and installing a kernel.
~ # # If you use genkernel, run genkernel as you would do normally.
~ # # IF YOUR KERNEL IS MARKED as "remerge required!" THEN
~ # # YOU SHOULD UPDATE YOUR KERNEL EVEN IF PORTAGE
~ # # REPORTS THAT THE SAME VERSION IS INSTALLED.
References
==========
~ [ 1 ] http://isec.pl/vulnerabilities/isec-0014-mremap-unmap.txt
Concerns?
=========
Security is a primary focus of Gentoo Linux and ensuring the
confidentiality and security of our users machines is of utmost
importance to us. Any security concerns should be addressed to
security@gentoo.org or alternatively, you may file a bug at
http://bugs.gentoo.org.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFASmFiMMXbAy2b2EIRAoCaAKCv7sK0dcnWWlOmt99O46UAYgH4JgCguJqP
aUwuRGQXe2983x90mRNAg1k=
=HqO0
-----END PGP SIGNATURE-----
|
|
Go to the Top of This SecurityTracker Archive Page
|