Skip to content
Permalink
Browse files Browse the repository at this point in the history
Check untrusted queue is in outside enclave
PiperOrigin-RevId: 333370935
Change-Id: Ic3f15d5db1302d95c7cb199b44172474fecb81ca
  • Loading branch information
kongoshuu committed Sep 23, 2020
1 parent 116b5ab commit a37fb6a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions asylo/platform/host_call/trusted/concurrency.cc
Expand Up @@ -93,6 +93,10 @@ int32_t *enc_untrusted_create_wait_queue() {
CheckStatusAndParamCount(status, output, "enc_untrusted_create_wait_queue",
2);
int32_t *queue = reinterpret_cast<int32_t *>(output.next<uintptr_t>());
if (!TrustedPrimitives::IsOutsideEnclave(queue, sizeof(int32_t))) {
TrustedPrimitives::BestEffortAbort(
"enc_untrusted_create_wait_queue: queue should be in untrusted memory");
}
int klinux_errno = output.next<int>();
if (queue == nullptr) {
errno = FromkLinuxErrorNumber(klinux_errno);
Expand Down

0 comments on commit a37fb6a

Please sign in to comment.