]> git.baikalelectronics.ru Git - kernel.git/commit
pidns: Outlaw thread creation after unshare(CLONE_NEWPID)
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 21 Dec 2012 03:26:06 +0000 (19:26 -0800)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 25 Dec 2012 06:53:14 +0000 (22:53 -0800)
commit5e35bffb48f7255f9d5ab903996e4d580d49a126
treea484c6a712a7361a07d9514ea86f835b70ad3414
parenta2e69c3c0f994da1cd5fbfdb8a9cfdb38b9f1ed5
pidns: Outlaw thread creation after unshare(CLONE_NEWPID)

The sequence:
unshare(CLONE_NEWPID)
clone(CLONE_THREAD|CLONE_SIGHAND|CLONE_VM)

Creates a new process in the new pid namespace without setting
pid_ns->child_reaper.  After forking this results in a NULL
pointer dereference.

Avoid this and other nonsense scenarios that can show up after
creating a new pid namespace with unshare by adding a new
check in copy_prodcess.

Pointed-out-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
kernel/fork.c