Skip to content
OpenAdvisories
Unscored Public exploit CVE-2018-18955 EUVD-2018-10659GHSA-c6xj-3c77-g5rg

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 mish…

Published Nov 16, 2018 · Updated Aug 5, 2024 · Assigned by mitre

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 linux 4.18.20-1 —
Debian 13 linux 4.18.20-1 —
Debian 12 linux 4.18.20-1 —
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS linux 4.15.0-42.45 USN-3836-1
Ubuntu 18.04 LTS linux-aws 4.15.0-1029.30 USN-3833-1
Ubuntu 18.04 LTS linux-azure 4.15.0-1035.36 —
Ubuntu 18.04 LTS linux-gcp 4.15.0-1025.26 USN-3836-1
Ubuntu 18.04 LTS linux-kvm 4.15.0-1027.27 USN-3836-1
Ubuntu 18.04 LTS linux-oem 4.15.0-1028.33 —
Ubuntu 18.04 LTS linux-raspi2 4.15.0-1029.31 USN-3836-1
Ubuntu 16.04 LTS linux-azure 4.15.0-1035.36~16.04.1 —
Ubuntu 16.04 LTS linux-gcp 4.15.0-1025.26~16.04.1 USN-3836-2
Ubuntu 16.04 LTS linux-hwe 4.15.0-42.45~16.04.1 USN-3836-2
Ubuntu 14.04 LTS linux-azure 4.15.0-1035.36~14.04.2 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Metasploit 1 module

GitHub 2 repositories

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 3

References