2019-09-10 13:32:10

by Dmitry V. Levin

[permalink] [raw]
Subject: Re: [PATCH] fork: fail on non-zero higher 32 bits of args.exit_signal

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 <[email protected]>

Reviewed-by: Dmitry V. Levin <[email protected]>


--
ldv