Page permissions not visible to the kernel
davidchisnall opened this issue · 0 comments
davidchisnall commented
We have several open bugs with the same root cause, so I am filing a new bug and will close the others as duplicates:
The enclave_mem code can change the permission of a page (either with mmap
or mprotect
), but the kernel does not see this change. The kernel will then call lkl_access_ok
, see that it is a valid enclave page, and trap. Userspace sees this as the system halting instead of returning an error from system calls that try to access invalid memory.
Note that this affects only buggy code. Well-behaved code should not be passing pointers to the kernel that userspace can't access.
I don't believe it's worth investing effort in making this work, we should fix this by fixing #597