diff options
author | Dmitry Chagin <dchagin@FreeBSD.org> | 2021-08-12 08:56:51 +0000 |
---|---|---|
committer | Dmitry Chagin <dchagin@FreeBSD.org> | 2022-06-17 19:33:32 +0000 |
commit | 56d1afc72d6a6464d450cb24190610f2ba55ac8e (patch) | |
tree | d9efb7bfa862d52c4aa3c186eb9abdc149e37e50 | |
parent | 59034620c491aab24a9dbceb8134a8987472b458 (diff) | |
download | src-56d1afc72d6a6464d450cb24190610f2ba55ac8e.tar.gz src-56d1afc72d6a6464d450cb24190610f2ba55ac8e.zip |
linux(4): Verify that higher 32bits of exit_signal in clone3 are unset.
MFC after: 2 weeks
(cherry picked from commit c2cc5345b88e98efb85ebc7318b8f92a8455345e)
-rw-r--r-- | sys/compat/linux/linux_fork.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/compat/linux/linux_fork.c b/sys/compat/linux/linux_fork.c index ba169ff98923..72e753db60d4 100644 --- a/sys/compat/linux/linux_fork.c +++ b/sys/compat/linux/linux_fork.c @@ -412,6 +412,10 @@ linux_clone3_args_valid(struct l_user_clone_args *uca) if (uca->stack != 0 && uca->stack_size == 0) return (EINVAL); + /* Verify that higher 32bits of exit_signal are unset. */ + if ((uca->exit_signal & ~(uint64_t)LINUX_CSIGNAL) != 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"); |