]> git.baikalelectronics.ru Git - kernel.git/commit
proc: Restrict mounting the proc filesystem
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 26 Mar 2013 02:57:10 +0000 (19:57 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Mon, 26 Aug 2013 18:36:58 +0000 (11:36 -0700)
commita16a72e6d2242a652c69ae5e39a8dfe30bb7a019
tree29d0afcbf37968e8fccd1dfff76deadf86c7a338
parent5ba70c697c55f62c0d1248204d125c9882a37ddc
proc: Restrict mounting the proc filesystem

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: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
fs/proc/root.c