Bug 1651384 (CVE-2018-18955) - CVE-2018-18955 kernel: Privilege escalation in map_write() in kernel/user_namespace.c
Summary: CVE-2018-18955 kernel: Privilege escalation in map_write() in kernel/user_nam...
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2018-18955
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1652679 1652680 1652681
Blocks: 1651385
TreeView+ depends on / blocked
 
Reported: 2018-11-19 21:20 UTC by Pedro Sampaio
Modified: 2021-09-13 09:20 UTC (History)
48 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Linux kernel where map_write() in kernel/user_namespace.c allows privilege escalation as it mishandles nested user namespaces with more than 5 UID or GID ranges. An unprivileged user with CAP_SYS_ADMIN in an affected user namespace can bypass access controls on resources outside the namespace. This is possible because a user/group id transformation takes place properly for the namespaced-to-kernel direction but not for the kernel-to-namespaced direction.
Clone Of:
Environment:
Last Closed: 2019-06-10 10:42:48 UTC
Embargoed:


Attachments (Terms of Use)

Description Pedro Sampaio 2018-11-19 21:20:16 UTC
A security flaw was found in the Linux kernel where map_write() in kernel/user_namespace.c allows privilege escalation as it mishandles nested user namespaces with more than 5 UID or GID ranges. An unprivileged user with CAP_SYS_ADMIN in an affected user namespace can bypass access controls on resources outside the namespace. This is possible because a user/group id transformation takes place properly for the namespaced-to-kernel direction but not for the kernel-to-namespaced direction.

External References:

https://bugs.chromium.org/p/project-zero/issues/detail?id=1712

https://seclists.org/oss-sec/2018/q4/150

An upstream patch:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd

Comment 3 Vladis Dronov 2018-11-22 15:12:26 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 1652681]

Comment 6 Justin M. Forbes 2018-11-26 12:41:44 UTC
This was fixed for Fedora with the 4.19.2 kernel rebase.

Comment 8 Petr Matousek 2021-03-05 14:42:38 UTC
Statement:

This issue does not affect the Linux kernel versions as shipped with Red Hat Enterprise Linux 5, 6 and 7 because they did not include the commit that introduced this issue.

This issue does not affect Red Hat Enterprise Linux 8 because the fix for this issue has been included since the Red Hat Enterprise Linux 8 release.


Note You need to log in before you can comment on or make changes to this bug.