Commit 12b38e76 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

parasite: Don't inject code out of blob

It actually not a problem since we never reach a tail
out of blob, but better to be on a safe side (after
all there is no guarantee that .data section will not
end up exactly at blob final bytes).
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Acked-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 39976326
......@@ -592,7 +592,7 @@ struct parasite_ctl *parasite_infect_seized(pid_t pid, int pid_dir, struct list_
}
pr_info("Putting parasite blob into %p->%p\n", ctl->local_map, ctl->remote_map);
memcpy(ctl->local_map, parasite_blob, parasite_size);
memcpy(ctl->local_map, parasite_blob, sizeof(parasite_blob));
jerr(ptrace(PTRACE_SETREGS, pid, NULL, &regs_orig), err_munmap_restore);
......
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