瀏覽代碼

[Pal/Linux-SGX] Propagate untrusted environment variables to untrusted child process

Propagating untrusted environment variables to the child process does not harm
security of enclaves. This propagation is required for e.g. debugging multi-
process applications and for network proxy settings.

Note that trusted environment variables are correctly passed from parent enclave
to child enclave using the checkpoint/restore protocol.
Dmitrii Kuvaiskii 6 年之前
父節點
當前提交
153b9b364f
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      Pal/src/host/Linux-SGX/sgx_process.c

+ 2 - 1
Pal/src/host/Linux-SGX/sgx_process.c

@@ -91,7 +91,8 @@ int sgx_create_process (const char * uri, int nargs, const char ** args,
         if (IS_ERR(rete))
             goto out_child;
 
-        rete = INLINE_SYSCALL(execve, 3, PAL_LOADER, argv, NULL);
+        extern char** environ;
+        rete = INLINE_SYSCALL(execve, 3, PAL_LOADER, argv, environ);
 
         /* shouldn't get to here */
         SGX_DBG(DBG_E, "unexpected failure of new process\n");