# US 2022/0012369 A1 · Techniques and technologies to address malicious single-stepping and zero-stepping of trusted execution environments

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

- Number: US 2022/0012369 A1
- Document ID: US20220012369A1
- Status: Published application
- Kind: A1
- Application number: 17/485,077
- Filed: 2021-09-24
- Published: 2022-01-13
- Earliest claimed: 2021-09-24
- Assignees: Intel Corporation
- Applicants: Intel Corporation
- Inventors: Scott Constable; Yuan Xiao; Bin Xing; Mona Vij; Mark Shanahan
- Web page: https://patentgrep.com/patent/US20220012369A1

## CPC

- G06F 21/74: operating in dual or compartmented mode, i.e. at least one secure mode
- G06F 9/30076: {to perform miscellaneous control operations, e.g. NOP}
- G06F 11/0721: {within a central processing unit [CPU]}
- G06F 11/076: {by exceeding a count or rate limit, e.g. word- or bit count limit}
- G06F 11/0793: {Remedial or corrective actions (recovery from an exception in an instruction pipeline G06F9/3861; by retry G06F11/1402; for recovering from a failure of a protocol instance or entity H04L69/40)}
- G06F 11/3024: {where the computing system component is a central processing unit [CPU]}
- G06F 12/0811: with multilevel cache hierarchies
- G06F 12/0842: for multiprocessing or multitasking
- G06F 12/0862: with prefetch
- G06F 12/1416: {by checking the object accessibility, e.g. type of access defined by the memory independently of subject rights (G06F12/1458 takes precedence)}
- G06F 12/1441: {for a range}
- G06F 21/52: during program execution, e.g. stack integrity {; Preventing unwanted data erasure; Buffer overflow}
- G06F 21/53: by executing in a restricted environment, e.g. sandbox or secure virtual machine
- G06F 21/554: {involving event detection and direct action}
- G06F 21/556: {involving covert channels, i.e. data leakage between processes (inhibiting the analysis of circuitry or operation with measures against power attack G06F21/755)}
- G06F 21/577: {Assessing vulnerabilities and evaluating computer system security}
- G06F 21/72: in cryptographic circuits
- G06F 2201/81: Threshold
- G06F 2201/86: Event-based monitoring
- G06F 2201/88: Monitoring involving counting
- G06F 2212/1052: Security improvement
- G06F 2212/6028: Prefetching based on hints or prefetch instructions
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In one embodiment, an apparatus comprises a processing circuitry to detect an occurrence of at least one of a single-stepping event or a zero-stepping event in an execution thread on an architecturally protected enclave and in response to the occurrence, implement at least one mitigation process to inhibit further occurrences of the at least one of a single-stepping event or a zero-stepping event in the architecturally protected enclave.

## Claims

### Claim 1

An apparatus comprising a processing circuitry to:
detect an occurrence of at least one of a single-stepping event or a zero-stepping event in an execution thread on an architecturally protected enclave; and
in response to the occurrence, implement at least one mitigation process to inhibit further occurrences of the at least one of a single-stepping event or a zero-stepping event in the architecturally protected enclave.

### Claim 2 (depends on 1)

The apparatus of claim 1, comprising circuitry to:
implement a counter to monitor forward progress of the compute process which is to execute in the architecturally protected enclave; and
generate an error signal when the counter indicates that the forward progress is less than a threshold.

### Claim 3 (depends on 1)

The apparatus of claim 1, comprising circuitry to:
monitor a frequency of fault events in the execution thread on the architecturally protected enclave;
monitor a number instructions that execute between an occurrence of fault events in the execution thread on the architecturally protected enclave; and
generate an error signal when a frequency of the fault events is greater than a threshold.

### Claim 4 (depends on 1)

The apparatus processor of claim 1, comprising circuitry to:
detect a page fault within a locked region of a computer-readable memory in the architecturally protected enclave; and
in response to the page fault, generate an error signal.

### Claim 5 (depends on 1)

The apparatus of claim 1, comprising circuitry to:
implement a counter to monitor a number of asynchronous enclave exit (AEX) events that occur in the architecturally protected enclave; and
generate an error signal when the number of asynchronous enclave exit (AEX) events is greater than a threshold.

### Claim 6 (depends on 1)

The apparatus of claim 1, comprising circuitry to:
determine one or more memory addresses to be accessed by one or more instructions to be executed by the architecturally protected enclave following an asynchronous enclave exit (AEX) event on the architecturally protected enclave; and
initiate a prefetch operation to access the one or more memory addresses.

### Claim 7 (depends on 1)

The apparatus of claim 1, comprising circuitry to:
initiate a branch speculation process for the execution thread to warm up a cache memory.

### Claim 8

A method comprising:
detecting an occurrence of at least one of a single-stepping event or a zero-stepping event in an execution thread on an architecturally protected enclave; and
in response to the occurrence, implementing at least one mitigation process to inhibit further occurrences of the at least one of a single-stepping event or a zero-stepping event in the architecturally protected enclave.

### Claim 9 (depends on 8)

The method of claim 8, further comprising:
implementing a counter to monitor forward progress of the compute process which is to execute in the architecturally protected enclave; and
generating an error signal when the counter indicates that the forward progress is less than a threshold.

### Claim 10 (depends on 8)

The method of claim 8, further comprising:
monitoring a frequency of fault events in the execution thread on the architecturally protected enclave;
monitoring a number instructions that execute between an occurrence of fault events in the execution thread on the architecturally protected enclave; and
generating an error signal when a frequency of the fault events is greater than a threshold.

### Claim 11 (depends on 8)

The method of claim 8, further comprising:
detecting a page fault within a locked region of a computer-readable memory in the architecturally protected enclave; and
in response to the page fault, generating an error signal.

### Claim 12 (depends on 8)

The method of claim 8, further comprising:
implementing a counter to monitor a number of asynchronous enclave exit (AEX) events that occur in the architecturally protected enclave; and
generating an error signal when the number of asynchronous enclave exit (AEX) events is greater than a threshold.

### Claim 13 (depends on 8)

The method of claim 8, further comprising:
determining one or more memory addresses to be accessed by one or more instructions to be executed by the architecturally protected enclave following an asynchronous enclave exit (AEX) event on the architecturally protected enclave; and
initiating a prefetch operation to access the one or more memory addresses.

### Claim 14 (depends on 8)

The method of claim 8, further comprising:
initiating a branch speculation process for the execution thread to warm up a cache memory.

### Claim 15

A non-transitory machine readable medium that stores code that when executed by a machine causes the machine to:
detect an occurrence of at least one of a single-stepping event or a zero-stepping event in an execution thread on an architecturally protected enclave; and
in response to the occurrence, implement at least one mitigation process to inhibit further occurrences of the at least one of a single-stepping event or a zero-stepping event in the architecturally protected enclave.

### Claim 16 (depends on 15)

The non-transitory machine readable medium of claim 15, comprising code that when executed by a machine causes the machine to:
implement a counter to monitor forward progress of the compute process which is to execute in the architecturally protected enclave; and
generate an error signal when the counter indicates that the forward progress is less than a threshold.

### Claim 17 (depends on 15)

The non-transitory machine readable medium of claim 15, comprising code that when executed by a machine causes the machine to:
monitor a frequency of fault events in the execution thread on the architecturally protected enclave;
monitor a number instructions that execute between an occurrence of fault events in the execution thread on the architecturally protected enclave; and
generate an error signal when a frequency of the fault events is greater than a threshold.

### Claim 18 (depends on 15)

The non-transitory machine readable medium of claim 15, comprising code that when executed by a machine causes the machine to:
detect a page fault within a locked region of a computer-readable memory in the architecturally protected enclave; and
in response to the page fault, generate an error signal.

### Claim 19 (depends on 15)

The non-transitory machine readable medium of claim 15, comprising code that when executed by a machine causes the machine to:
implement a counter to monitor a number of asynchronous enclave exit (AEX) events that occur in the architecturally protected enclave; and
generate an error signal when the number of asynchronous enclave exit (AEX) events is greater than a threshold.

### Claim 20 (depends on 15)

The non-transitory machine readable medium of claim 15, comprising code that when executed by a machine causes the machine to:
determine one or more memory addresses to be accessed by one or more instructions to be executed by the architecturally protected enclave following an asynchronous enclave exit (AEX) event on the architecturally protected enclave; and
initiate a prefetch operation to access the one or more memory addresses.

### Claim 21 (depends on 15)

The non-transitory machine readable medium of claim 15, comprising code that when executed by a machine causes the machine to:
initiate a branch speculation process for the execution thread to warm up a cache memory.
