]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
userns: Changing any namespace id mappings should require privileges
authorAndy Lutomirski <luto@amacapital.net>
Sun, 14 Apr 2013 18:44:04 +0000 (11:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Apr 2013 19:51:23 +0000 (12:51 -0700)
commit37ed4a3f3bb107bfb307610b9ab2b87db03df3a6
tree4217265b5f8a960f5f8c041e616f373959481b64
parentbe4c1b46075d42cbd82bc0d1e833dc4de052ae85
userns: Changing any namespace id mappings should require privileges

commit 41c21e351e79004dbb4efa4bc14a53a7e0af38c5 upstream.

Changing uid/gid/projid mappings doesn't change your id within the
namespace; it reconfigures the namespace.  Unprivileged programs should
*not* be able to write these files.  (We're also checking the privileges
on the wrong task.)

Given the write-once nature of these files and the other security
checks, this is likely impossible to usefully exploit.

Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/user_namespace.c