• Eric W. Biederman's avatar
    userns: Only allow the creator of the userns unprivileged mappings · 42eec84f
    Eric W. Biederman authored
    commit f95d7918 upstream.
    
    If you did not create the user namespace and are allowed
    to write to uid_map or gid_map you should already have the necessary
    privilege in the parent user namespace to establish any mapping
    you want so this will not affect userspace in practice.
    
    Limiting unprivileged uid mapping establishment to the creator of the
    user namespace makes it easier to verify all credentials obtained with
    the uid mapping can be obtained without the uid mapping without
    privilege.
    
    Limiting unprivileged gid mapping establishment (which is temporarily
    absent) to the creator of the user namespace also ensures that the
    combination of uid and gid can already be obtained without privilege.
    
    This is part of the fix for CVE-2014-8989.
    Reviewed-by: default avatarAndy Lutomirski <luto@amacapital.net>
    Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
    Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
    42eec84f
user_namespace.c 23 KB