Commit 284e6d39 authored by Richard Weinberger's avatar Richard Weinberger

um: Ensure that a stub page cannot get unmapped

Trinity discovered an execution path such that a task
can unmap his stub page.
Reported-by: default avatarToralf Förster <toralf.foerster@gmx.de>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent ae5db6d1
...@@ -124,6 +124,9 @@ static int add_munmap(unsigned long addr, unsigned long len, ...@@ -124,6 +124,9 @@ static int add_munmap(unsigned long addr, unsigned long len,
struct host_vm_op *last; struct host_vm_op *last;
int ret = 0; int ret = 0;
if ((addr >= STUB_START) && (addr < STUB_END))
return -EINVAL;
if (hvc->index != 0) { if (hvc->index != 0) {
last = &hvc->ops[hvc->index - 1]; last = &hvc->ops[hvc->index - 1];
if ((last->type == MUNMAP) && if ((last->type == MUNMAP) &&
......
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