Vulnerability Assessment & Network Security Forums



If through a vulnerability assessment, a network security issue is detected for the vulnerability below, applying the appropriate security patches in a timely matter is very important.  If you have detected that your system has already been compromised, following CERT's Network Security recovery document will assist with recommended steps for system recovery.


Home >> Browse Vulnerability Assessment Database >> Gentoo Local Security Checks >> [GLSA-200403-02] Linux kernel do_mremap local privilege escalation vulnerability


Vulnerability Assessment Details

[GLSA-200403-02] Linux kernel do_mremap local privilege escalation vulnerability

Vulnerability Assessment Summary
Linux kernel do_mremap local privilege escalation vulnerability

Detailed Explanation for this Vulnerability Assessment
The remote host is affected by the vulnerability described in GLSA-200403-02
(Linux kernel do_mremap local privilege escalation vulnerability)


The memory subsystem permits 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-super-user 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 rights 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 permiting
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.

References:
http://isec.pl/vulnerabilities/isec-0014-mremap-unmap.txt


Solution:
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.


Network Security Threat Level: High


Networks Security ID:

Vulnerability Assessment Copyright: (C) 2005 Michel Arboi

Cables, Connectors


Dell PowerEdge R720 Server - 2x8c CPU,256Gb RAM, 128Gb SSD/3x600Gb SAS, Proxmox picture

Dell PowerEdge R720 Server - 2x8c CPU,256Gb RAM, 128Gb SSD/3x600Gb SAS, Proxmox

$340.00



DELL PowerEdge R730XD 24x 2.5

DELL PowerEdge R730XD 24x 2.5" Server Dual 750W Dual Heatsink - BareBones TESTED

$299.99



Supermicro 4U 36 Bay Storage Server 2.4Ghz 8-C 128GB 1x1280W Rails TrueNAS ZFS picture

Supermicro 4U 36 Bay Storage Server 2.4Ghz 8-C 128GB 1x1280W Rails TrueNAS ZFS

$721.06



Dell PowerEdge R630 8SFF 2.6Ghz 20-Core 128GB Mem 4x1G RJ-45 NIC 2x750W PSU picture

Dell PowerEdge R630 8SFF 2.6Ghz 20-Core 128GB Mem 4x1G RJ-45 NIC 2x750W PSU

$399.04



INTEL XEON GOLD 6148 20 Core SR3B6 2.4GHZ 27.5MB Processor    @24 picture

INTEL XEON GOLD 6148 20 Core SR3B6 2.4GHZ 27.5MB Processor @24

$99.99



Intel Xeon Gold 6140 SR3AX 2.3GHz 18-Core Processor CPU picture

Intel Xeon Gold 6140 SR3AX 2.3GHz 18-Core Processor CPU

$39.99



Intel Xeon Gold 6138 2.0GHz 27.5MB 20-Core 125W LGA3647 SR3B5 picture

Intel Xeon Gold 6138 2.0GHz 27.5MB 20-Core 125W LGA3647 SR3B5

$46.00



Intel Xeon E5-2690V2 3.00GHz 10-Core (SR1A5) Processor CPU READ DESCRIPTION picture

Intel Xeon E5-2690V2 3.00GHz 10-Core (SR1A5) Processor CPU READ DESCRIPTION

$12.00



HP Workstation Z640 2x Xeon E5-2623V4 32GB Ram 512 SSD Quadro K420 Linux GA picture

HP Workstation Z640 2x Xeon E5-2623V4 32GB Ram 512 SSD Quadro K420 Linux GA

$243.59



Dell Precision 5810 Tower Intel Xeon E5-1603v3 2.8GHz 8GB RAM 500GB HDD W10P GPU picture

Dell Precision 5810 Tower Intel Xeon E5-1603v3 2.8GHz 8GB RAM 500GB HDD W10P GPU

$129.99



Discussions

No Discussions have been posted on this vulnerability.