linux(4): Verify that higher 32bits of exit_signal in clone3 are unset.

MFC after:		2 weeks
This commit is contained in:
Dmitry Chagin 2021-08-12 11:56:51 +03:00
parent 4385147547
commit c2cc5345b8

View file

@ -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");