Date: Fri, 17 Jun 2022 19:38:45 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: 7df3421cb6e2 - stable/13 - linux(4): Fixup options value validation in linux_waitid(). Message-ID: <202206171938.25HJcji5015102@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=7df3421cb6e2178fbf92ed54f5990702de285cd3 commit 7df3421cb6e2178fbf92ed54f5990702de285cd3 Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2022-03-31 17:41:19 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2022-06-17 19:33:44 +0000 linux(4): Fixup options value validation in linux_waitid(). Reviewed by: emaste Differential revision: https://reviews.freebsd.org/D31554 MFC after: 2 weeks (cherry picked from commit d7e1e138ec66e410f525413b0caed089139f3cc0) --- sys/compat/linux/linux_misc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index ffebf9cd2e20..00783091175c 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1090,12 +1090,13 @@ linux_waitid(struct thread *td, struct linux_waitid_args *args) idtype_t idtype; int error, options; + if (args->options & ~(LINUX_WNOHANG | LINUX_WNOWAIT | LINUX_WEXITED | + LINUX_WSTOPPED | LINUX_WCONTINUED | __WCLONE | __WNOTHREAD | __WALL)) + return (EINVAL); + options = 0; linux_to_bsd_waitopts(args->options, &options); - if (options & ~(WNOHANG | WNOWAIT | WEXITED | WUNTRACED | WCONTINUED)) - return (EINVAL); - switch (args->idtype) { case LINUX_P_ALL: idtype = P_ALL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202206171938.25HJcji5015102>