diff --git a/sys/compat/linux/linux_fork.c b/sys/compat/linux/linux_fork.c --- a/sys/compat/linux/linux_fork.c +++ b/sys/compat/linux/linux_fork.c @@ -64,6 +64,7 @@ #include #include #include +#include #include #include @@ -411,6 +412,20 @@ if (uca->stack != 0 && uca->stack_size == 0) return (EINVAL); + /* Verify that no unsupported flags are passed along. */ + if ((uca->flags & LINUX_CLONE_NEWTIME) != 0) { + LINUX_RATELIMIT_MSG("unsupported clone3 option CLONE_NEWTIME"); + return (ENOSYS); + } + if ((uca->flags & LINUX_CLONE_INTO_CGROUP) != 0) { + LINUX_RATELIMIT_MSG("unsupported clone3 option CLONE_INTO_CGROUP"); + return (ENOSYS); + } + if (uca->set_tid != 0 || uca->set_tid_size != 0) { + LINUX_RATELIMIT_MSG("unsupported clone3 set_tid"); + return (ENOSYS); + } + return (0); }