[CRIU] Re: [PATCH] parasite: Make sure the arguments passed do never overwrite args zone

Pavel Emelyanov xemul at parallels.com
Wed Sep 19 08:18:11 EDT 2012


On 09/19/2012 01:01 PM, Cyrill Gorcunov wrote:
> We do have build-time tests for that but it's not enough, better to
> be on safe side and double check the arguments size.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
>  parasite-syscall.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/parasite-syscall.c b/parasite-syscall.c
> index 64cc4c6..a912d30 100644
> --- a/parasite-syscall.c
> +++ b/parasite-syscall.c
> @@ -228,6 +228,8 @@ static int parasite_execute_by_pid(unsigned long cmd, struct parasite_ctl *ctl,
>  	int ret;
>  	user_regs_struct_t regs_orig, regs;
>  
> +	BUG_ON(args_size > PARASITE_ARG_SIZE);
> +
>  	if (ctl->pid == pid)
>  		regs = ctl->regs_orig;
>  	else {

Applied, thanks


More information about the CRIU mailing list