Date: Fri, 17 Jun 2022 19:38:09 GMT From: Dmitry Chagin <dchagin@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 56d1afc72d6a - stable/13 - linux(4): Verify that higher 32bits of exit_signal in clone3 are unset. Message-ID: <202206171938.25HJc9UH014297@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=56d1afc72d6a6464d450cb24190610f2ba55ac8e commit 56d1afc72d6a6464d450cb24190610f2ba55ac8e Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2021-08-12 08:56:51 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2022-06-17 19:33:32 +0000 linux(4): Verify that higher 32bits of exit_signal in clone3 are unset. MFC after: 2 weeks (cherry picked from commit c2cc5345b88e98efb85ebc7318b8f92a8455345e) --- sys/compat/linux/linux_fork.c | 4 ++++ 1 file changed, 4 insertions(+) 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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202206171938.25HJc9UH014297>