Control Transfer Termination Instructions for ROP Defense

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current techniques to defend against return-oriented programming (ROP) attacks are ineffective, allowing attackers to execute unintended control transfers and exploit vulnerabilities in computer systems by using sequences of instructions that end with return instructions.

Innovation Solution

The introduction of control transfer termination (CTT) instructions, such as ENDBRANCH and ENDRET, which are used to specify valid control transfer points, ensuring that control transfers only occur to programmer-intended locations, thereby preventing unintended gadgets from being executed.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If control transfer instructions (RET, CALL, JMP) are allowed to execute without restriction, then program flexibility and normal control flow are maintained, but systems become vulnerable to ROP attacks and unintended control transfers

Engineering Contradiction:
ImprovesecurityVSAvoidcontrol transfer flexibility
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent applies preliminary action by inserting control transfer termination instructions (CTT instructions like ENDBRANCH and ENDRET) at specific locations in the code before execution reaches potential attack vectors. These CTT instructions are placed in advance to mark valid control transfer targets, so when a RET instruction executes, the processor can immediately verify whether the target address corresponds to a pre-marked valid location, preventing ROP attacks before they can exploit unintended control transfers

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces CTT instructions as intermediary elements between control transfer instructions and their targets. When a control transfer instruction executes, the processor inserts a CTT instruction at the target address as a mediator that verifies the transfer's legitimacy. This intermediary mechanism allows the system to maintain normal control flow flexibility while adding a security layer that blocks malicious transfers without affecting legitimate program execution

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If CTT instructions are inserted to prevent ROP attacks, then security against unintended control transfers is improved, but code density decreases and executable size increases

Engineering Contradiction:
ImprovesecurityVSAvoidcode size
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent applies local quality by selectively inserting CTT instructions only at specific strategic locations rather than throughout the entire codebase. CTT instructions are placed at function epilogues, known valid control transfer targets, and other critical points where control transfers legitimately occur. This localized approach provides comprehensive security coverage while minimizing the total number of CTT instructions needed, thus reducing the impact on code size

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent enhances the utility of each CTT instruction by designing them to serve multiple functions: they mark valid control transfer targets, provide security verification points, and can also serve as optimization hints for the processor. This multi-functionality means that a single CTT instruction insertion provides broader security coverage and potential performance benefits, reducing the overall quantity of CTT instructions needed compared to approaches that require dedicated verification mechanisms at every possible transfer point

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Reliability

If CTT instructions are used to enforce valid control transfer locations, then the number of usable gadgets is reduced, but this may impact legitimate control flow operations

Engineering Contradiction:
ImprovesecurityVSAvoidcontrol flow operation
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent applies preliminary action by pre-marking all legitimate control transfer targets with CTT instructions during the compilation or code generation phase. This ensures that all valid control flow operations (function calls, returns, jumps) are anticipated and marked in advance, so the runtime security mechanism recognizes them as legitimate. Legitimate control flow operations are thus preserved because their targets were pre-identified and marked during development, while unintended gadgets lacking CTT markers are blocked

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11789735B2Control transfer termination instructions of an instruction set architecture (ISA)
Publication Date: 2023.10.17 INTEL CORP
  • US11789735B2 patent drawing
  • US11789735B2 patent drawing
  • US11789735B2 patent drawing

AI summary

In an embodiment, the present invention includes a processor having an execution logic to execute instructions and a control transfer termination (CTT) logic coupled to the execution logic. This logic is to cause a CTT fault to be raised if a target instruction of a control transfer instruction is not a CTT instruction. Other embodiments are described and claimed.