# US 2017/0255416 A1 · Technologies to defeat secure enclave side-channel attacks using fault-oriented programming

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2017/0255416 A1
- Document ID: US20170255416A1
- Status: Published application
- Kind: A1
- Application number: 15/061,489
- Filed: 2016-03-04
- Published: 2017-09-07
- Earliest claimed: 2016-03-04
- Assignees: Intel Corporation
- Inventors: Mingwei Zhang; Ravi L. Sahita
- Web page: https://patentgrep.com/patent/US20170255416A1

## CPC

- G06F 21/53: by executing in a restricted environment, e.g. sandbox or secure virtual machine
- G06F 2221/033: Test or assess software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Technologies for defeating secure enclave side-channel attacks include a computing device having a processor with secure enclave support. The computing device instruments an executable binary with multiple gadgets, a fault-generating function, and at least one invocation of the fault-generating function. The computing device executes the instrumented executable binary within a secure enclave. During execution of the instrumented binary, each gadget may be located at a different memory page of the secure enclave. The computing device invokes the fault-generating function, which selects a random sequence of the gadgets and executes the random sequence of gadgets. The processor may generate a page fault in response to executing each of the gadgets. Each gadget may generate one or more data accesses to memory pages within the secure enclave. The processor may generate a page fault in response to each of the data accesses. Other embodiments are described and claimed.

## Claims

### Claim 1

A computing device for secure execution, the computing device comprising:
an instrumentation module to instrument an executable binary with a plurality of gadgets, a fault-generating function, and an invocation of the fault-generating function to generate an instrumented binary;
a secure runtime module to (i) execute the instrumented binary within a secure enclave, wherein the secure enclave is established with secure enclave support of a processor of the computing device, and wherein each gadget of the plurality of gadgets is located at a predefined offset within a different memory page of the secure enclave, and (ii) invoke the fault-generating function in response to execution of the instrumented binary; and
a fault generation module to (i) select a random sequence of the plurality of gadgets in response to invocation of the fault-generating function and (ii) execute the random sequence of the plurality of gadgets.

### Claim 2 (depends on 1)

The computing device of claim 1, wherein to execute the random sequence of the plurality of gadgets comprises to generate a page fault for each gadget of the plurality of gadgets.

### Claim 3 (depends on 1)

The computing device of claim 1, wherein to select the random sequence of the plurality of gadgets comprises to select a sequence of gadgets from the plurality of gadgets in a random order.

### Claim 4 (depends on 1)

The computing device of claim 1, wherein the select the random sequence of the plurality of gadgets comprises to (i) randomly select a page index and (ii) determine an address of a gadget as a function of the page index and the predefined offset within the memory page.

### Claim 5 (depends on 1)

The computing device of claim 1, wherein to select the random sequence of the plurality of gadgets comprises to select a random number of gadgets from the plurality of gadgets.

### Claim 6 (depends on 1)

The computing device of claim 1, wherein to instrument the executable binary comprises to:
add a plurality of versions of the fault-generating function to the executable binary; and
add a plurality of invocations of the fault-generating function to the executable binary, wherein each invocation of the plurality of invocations is to invoke a version of the fault-generating function.

### Claim 7 (depends on 1)

The computing device of claim 1, wherein:
the plurality of gadgets comprises a plurality of return-oriented programming gadgets; and
to select the random sequence of the plurality of gadgets comprises to configure a user stack of the secure enclave to reference the random sequence of the plurality of gadgets.

### Claim 8 (depends on 1)

The computing device of claim 1, wherein to execute the random sequence of the plurality of gadgets comprises to generate, by a first gadget of the plurality of gadgets, a data access to a memory page of the secure enclave.

### Claim 9 (depends on 8)

The computing device of claim 8, wherein to generate the data access comprises to generate a page fault by the first gadget.

### Claim 10 (depends on 8)

The computing device of claim 8, wherein to generate the data access comprises to access a data structure of the instrumented binary.

### Claim 11 (depends on 8)

The computing device of claim 8, wherein to select the random sequence of the plurality of gadgets further comprises to randomly select a memory address of the data access to the memory page of the secure enclave.

### Claim 12 (depends on 8)

The computing device of claim 8, wherein to generate the data access to the memory page of the secure enclave comprises to determine, by the first gadget, an address within the memory page based on a user stack of the secure enclave.

### Claim 13 (depends on 12)

The computing device of claim 12, wherein to select the random sequence of the plurality of gadgets comprises to configure the user stack to reference the address within the memory page.

### Claim 14

A method for secure execution, the method comprising:
instrumenting, by a computing device, an executable binary with a plurality of gadgets, a fault-generating function, and an invocation of the fault-generating function to generate an instrumented binary;
executing the instrumented executable binary within a secure enclave, wherein the secure enclave is established with secure enclave support of a processor of the computing device, and wherein each gadget of the plurality of gadgets is located at a predefined offset within a different memory page of the secure enclave;
invoking the fault-generating function in response to executing the instrumented binary;
selecting a random sequence of the plurality of gadgets in response to invoking the fault-generating function; and
executing the random sequence of the plurality of gadgets.

### Claim 15 (depends on 14)

The method of claim 14, wherein executing the random sequence of the plurality of gadgets comprises generating a page fault for each gadget of the plurality of gadgets.

### Claim 16 (depends on 14)

The method of claim 14, wherein instrumenting the executable binary comprises:
adding a plurality of versions of the fault-generating function to the executable binary; and
adding a plurality of invocations of the fault-generating function to the executable binary, wherein each invocation of the plurality of invocations is to invoke a version of the fault-generating function.

### Claim 17 (depends on 14)

The method of claim 14, wherein executing the random sequence of the plurality of gadgets comprises generating, by a first gadget of the plurality of gadgets, a data access to a memory page of the secure enclave.

### Claim 18 (depends on 17)

The method of claim 17, wherein generating the data access comprises generating a page fault by the first gadget.

### Claim 19 (depends on 17)

The method of claim 17, wherein selecting the random sequence of the plurality of gadgets further comprises randomly selecting a memory address of the data access to the memory page of the secure enclave.

### Claim 20

One or more computer-readable storage media comprising a plurality of instructions that in response to being executed cause a computing device to:
instrument an executable binary with a plurality of gadgets, a fault-generating function, and an invocation of the fault-generating function to generate an instrumented binary;
execute the instrumented executable binary within a secure enclave, wherein the secure enclave is established with secure enclave support of a processor of the computing device, and wherein each gadget of the plurality of gadgets is located at a predefined offset within a different memory page of the secure enclave;
invoke the fault-generating function in response to executing the instrumented binary;
select a random sequence of the plurality of gadgets in response to invoking the fault-generating function; and
execute the random sequence of the plurality of gadgets.

### Claim 21 (depends on 20)

The one or more computer-readable storage media of claim 20, wherein to execute the random sequence of the plurality of gadgets comprises to generate a page fault for each gadget of the plurality of gadgets.

### Claim 22 (depends on 20)

The one or more computer-readable storage media of claim 20, wherein to instrument the executable binary comprises to:
add a plurality of versions of the fault-generating function to the executable binary; and
add a plurality of invocations of the fault-generating function to the executable binary, wherein each invocation of the plurality of invocations is to invoke a version of the fault-generating function.

### Claim 23 (depends on 20)

The one or more computer-readable storage media of claim 20, wherein to execute the random sequence of the plurality of gadgets comprises to generate, by a first gadget of the plurality of gadgets, a data access to a memory page of the secure enclave.

### Claim 24 (depends on 23)

The one or more computer-readable storage media of claim 23, wherein to generate the data access comprises to generate a page fault by the first gadget.

### Claim 25 (depends on 23)

The one or more computer-readable storage media of claim 23, wherein to select the random sequence of the plurality of gadgets further comprises to randomly select a memory address of the data access to the memory page of the secure enclave.
