aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2013-08-08 18:55:32 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2013-08-08 13:11:39 -0700
commit8742f229b635bf1c1c84a3dfe5e47c814c20b5c8 (patch)
tree3d9f64cf0c9d705b9f422d137c8067fa2d41f3c8 /include/linux
parentMerge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 (diff)
downloadlinux-dev-8742f229b635bf1c1c84a3dfe5e47c814c20b5c8.tar.xz
linux-dev-8742f229b635bf1c1c84a3dfe5e47c814c20b5c8.zip
userns: limit the maximum depth of user_namespace->parent chain
Ensure that user_namespace->parent chain can't grow too much. Currently we use the hardroded 32 as limit. Reported-by: Andy Lutomirski <luto@amacapital.net> Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/user_namespace.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index b6b215f13b45..14105c26a836 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
@@ -23,6 +23,7 @@ struct user_namespace {
struct uid_gid_map projid_map;
atomic_t count;
struct user_namespace *parent;
+ int level;
kuid_t owner;
kgid_t group;
unsigned int proc_inum;