Rapid7 Vulnerability & Exploit Database

Linux Nested User Namespace idmap Limit Local Privilege Escalation

Back to Search

Linux Nested User Namespace idmap Limit Local Privilege Escalation

Disclosed
11/15/2018
Created
03/19/2019

Description

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).

Author(s)

  • Jann Horn
  • bcoles <bcoles@gmail.com>

Platform

Linux

Architectures

x86, x64

Development

References

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/linux/local/nested_namespace_idmap_limit_priv_esc
msf exploit(nested_namespace_idmap_limit_priv_esc) > show targets
    ...targets...
msf exploit(nested_namespace_idmap_limit_priv_esc) > set TARGET < target-id >
msf exploit(nested_namespace_idmap_limit_priv_esc) > show options
    ...show and set options...
msf exploit(nested_namespace_idmap_limit_priv_esc) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;