mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-17 20:54:10 +00:00
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: Toralf Förster <toralf.foerster@gmx.de> Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
ae5db6d123
commit
284e6d3951
1 changed files with 3 additions and 0 deletions
|
@ -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) &&
|
||||||
|
|
Loading…
Add table
Reference in a new issue