Exploit database

Vulnerability

CVE-2018-18955

Vulnerability details

Score
7.0
Severity
high

CVSS 3.0 · NVD

Vector string

CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Description

In the Linux kernel 4.15.x through 4.19.x before 4.19.2, map_write() in kernel/user_namespace.c allows privilege escalation because it mishandles nested user namespaces with more than 5 UID or GID ranges. A user who has CAP_SYS_ADMIN in an affected user namespace can bypass access controls on resources outside the namespace, as demonstrated by reading /etc/shadow. This occurs because an ID transformation takes place properly for the namespaced-to-kernel direction but not for the kernel-to-namespaced direction.

CVE Program

Exploit source choices

8 sources
Linux Nested User Namespace idmap Limit Local Privilege Escalation
MSF-linux--local--nested_namespace_idmap_limit_priv_escMetasploitLinux / remote

This module exploits a vulnerability in Linux kernels 4.15.0 to 4.18.18, and 4.19.0 to 4.19.1, where broken uid/gid mappings between nested user namespaces and kernel uid/gid mappings allow elevation to root (CVE-2018-18955). The target system must have unprivileged user namespaces enabled and the newuidmap and newgidmap helpers installed (from uidmap package). This module has been tested successfully on: Fedora Workstation 28 kernel 4.16.3-301.fc28.x86_64; Kubuntu 18.04 LTS kernel 4.15.0-20-generic (x86_64); Linux Mint 19 kernel 4.15.0-20-generic (x86_64); Ubuntu Linux 18.04.1 LTS kernel 4.15.0-20-generic (x86_64).

2018-11-15nested_namespace_idmap_limit_priv_esc.rb
scheatkode/cve-2018-18955
GH-0bde5532639b7c703db471abbf59cc82GitHubUnofficial GitHub source

💀 Linux local root exploit for CVE-2018-18955

2022-01-199 files · 25 stars