Commit 89ab41d2 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

parasite: Make sure the arguments passed do never overwrite args zone

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: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent d7d600c1
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment