GLSA-200401-01 : Linux kernel do_mremap() local privilege escalation vulnerability

high Nessus Plugin ID 14441

Synopsis

The remote Gentoo host is missing one or more security-related patches.

Description

The remote host is affected by the vulnerability described in GLSA-200401-01 (Linux kernel do_mremap() local privilege escalation vulnerability)

The memory subsystem allows for shrinking, growing, and moving of chunks of memory along any of the allocated memory areas which the kernel possesses.
A typical virtual memory area covers at least one memory page. An incorrect bound check discovered inside the do_mremap() kernel code performing remapping of a virtual memory area may lead to creation of a virtual memory area of 0 bytes length.
The problem is based on the general mremap flaw that remapping 2 pages from inside a VMA creates a memory hole of only one page in length but an additional VMA of two pages. In the case of a zero sized remapping request no VMA hole is created but an additional VMA descriptor of 0 bytes in length is created.
This advisory also addresses an information leak in the Linux RTC system.
Impact :

Arbitrary code 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(2) system call any process may misuse its unexpected behavior to disrupt the kernel memory management subsystem. Proper exploitation of this vulnerability may lead to local privilege escalation including execution of arbitrary code with kernel level 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 :

There is no temporary workaround - a kernel upgrade is required. A list of unaffected kernels is provided along with this announcement.

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.

See Also

https://isec.pl/en/vulnerabilities/isec-0012-mremap.txt

https://security.gentoo.org/glsa/200401-01

Plugin Details

Severity: High

ID: 14441

File Name: gentoo_GLSA-200401-01.nasl

Version: 1.14

Type: local

Published: 8/30/2004

Updated: 1/6/2021

Supported Sensors: Nessus

Vulnerability Information

CPE: p-cpe:/a:gentoo:linux:aa-sources, p-cpe:/a:gentoo:linux:alpha-sources, p-cpe:/a:gentoo:linux:arm-sources, p-cpe:/a:gentoo:linux:ck-sources, p-cpe:/a:gentoo:linux:compaq-sources, p-cpe:/a:gentoo:linux:development-sources, p-cpe:/a:gentoo:linux:gaming-sources, p-cpe:/a:gentoo:linux:gentoo-dev-sources, p-cpe:/a:gentoo:linux:gentoo-sources, p-cpe:/a:gentoo:linux:grsec-sources, p-cpe:/a:gentoo:linux:gs-sources, p-cpe:/a:gentoo:linux:hardened-sources, p-cpe:/a:gentoo:linux:hppa-sources, p-cpe:/a:gentoo:linux:ia64-sources, p-cpe:/a:gentoo:linux:mips-prepatch-sources, p-cpe:/a:gentoo:linux:mips-sources, p-cpe:/a:gentoo:linux:mm-sources, p-cpe:/a:gentoo:linux:openmosix-sources, p-cpe:/a:gentoo:linux:pac-sources, p-cpe:/a:gentoo:linux:pfeifer-sources, p-cpe:/a:gentoo:linux:planet-ccrma-sources, p-cpe:/a:gentoo:linux:ppc-development-sources, p-cpe:/a:gentoo:linux:ppc-sources, p-cpe:/a:gentoo:linux:ppc-sources-benh, p-cpe:/a:gentoo:linux:ppc-sources-crypto, p-cpe:/a:gentoo:linux:selinux-sources, p-cpe:/a:gentoo:linux:sparc-dev-sources, p-cpe:/a:gentoo:linux:sparc-sources, p-cpe:/a:gentoo:linux:usermode-sources, p-cpe:/a:gentoo:linux:vanilla-prepatch-sources, p-cpe:/a:gentoo:linux:vanilla-sources, p-cpe:/a:gentoo:linux:win4lin-sources, p-cpe:/a:gentoo:linux:wolk-sources, p-cpe:/a:gentoo:linux:xfs-sources, cpe:/o:gentoo:linux

Required KB Items: Host/local_checks_enabled, Host/Gentoo/release, Host/Gentoo/qpkg-list

Patch Publication Date: 1/8/2004

Reference Information

GLSA: 200401-01