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)
commitaee1c13dd0f6c2fc56e0e492b349ee8ac655880f
tree29d0afcbf37968e8fccd1dfff76deadf86c7a338
parent5ff9d8a65ce80efb509ce4e8051394e9ed2cd942
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