]> git.baikalelectronics.ru Git - kernel.git/commit
clone3: add a check for the user struct size if CLONE_INTO_CGROUP is set
authorEugene Syromiatnikov <esyr@redhat.com>
Sun, 12 Apr 2020 20:31:23 +0000 (22:31 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 15 Apr 2020 07:56:25 +0000 (09:56 +0200)
commit459fe9c7949dc6dc13e11191c16ba6b94d61a3fd
treeaf488c4e93c0f2ce7d07b024ee946d2ea7cd3c30
parent6fcce1dabe40e795c0b620c94d326bf7ce6618b4
clone3: add a check for the user struct size if CLONE_INTO_CGROUP is set

Passing CLONE_INTO_CGROUP with an under-sized structure (that doesn't
properly contain cgroup field) seems like garbage input, especially
considering the fact that fd 0 is a valid descriptor.

Signed-off-by: Eugene Syromiatnikov <esyr@redhat.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Link: https://lore.kernel.org/r/20200412203123.GA5869@asgard.redhat.com
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
kernel/fork.c