• Eric W. Biederman's avatar
    proc: Restrict mounting the proc filesystem · aee1c13d
    Eric W. Biederman authored
    Don't allow mounting the proc filesystem unless the caller has
    CAP_SYS_ADMIN rights over the pid namespace.  The principle here is if
    you create or have capabilities over it you can mount it, otherwise
    you get to live with what other people have mounted.
    
    Andy pointed out that this is needed to prevent users in a user
    namespace from remounting proc and specifying different hidepid and gid
    options on already existing proc mounts.
    
    Cc: stable@vger.kernel.org
    Reported-by: default avatarAndy Lutomirski <luto@amacapital.net>
    Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
    aee1c13d
root.c 5.48 KB