Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -124,6 +124,9 @@ static int add_munmap(unsigned long addr, unsigned long len,
	struct host_vm_op *last;
	int ret = 0;

	if ((addr >= STUB_START) && (addr < STUB_END))
		return -EINVAL;

	if (hvc->index != 0) {
		last = &hvc->ops[hvc->index - 1];
		if ((last->type == MUNMAP) &&