Re: [PATCH] fork: fail on non-zero higher 32 bits of args.exit_signal
From: Dmitry V. Levin
Date: Tue Sep 10 2019 - 08:20:37 EST
On Tue, Sep 10, 2019 at 12:57:11PM +0100, Eugene Syromiatnikov wrote:
> Previously, higher 32 bits of exit_signal fields were lost when
> copied to the kernel args structure (that uses int as a type for the
> respective field). Fail with EINVAL if these are set as it looks like
> there's no sane reason to accept them.
>
> * kernel/fork.c (copy_clone_args_from_user): Fail with -EINVAL if
> args.exit_signal converted to unsigned int is not equal to the original
> value.
>
> Signed-off-by: Eugene Syromiatnikov <esyr@xxxxxxxxxx>
Reviewed-by: Dmitry V. Levin <ldv@xxxxxxxxxxxx>
--
ldv