Dynamic Code Execution Control via Precomputed Control Words

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for controlling code execution in processing systems are inadequate in preventing cyber attacks, particularly due to programming language weaknesses and execution permissivity, which can lead to exploits like stack smashing and return-oriented programming, and existing protections like ASLR and CFI are either too late or resource-intensive.

Innovation Solution

A computer-implemented method that uses a control flow graph with initialization vectors and precomputed control words to dynamically verify allowed transitions, ensuring that only authorized execution paths are followed by generating a posteriori control words and comparing them to a priori control words, thereby interrupting execution if unauthorized transitions are detected.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If existing protections like ASLR and CFI are implemented, then security against execution flow hijacking is improved, but processing overhead and resource consumption increase

Engineering Contradiction:
Improvesecurity against execution flow hijackingVSAvoidprocessing overhead
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies preliminary action by precomputing control words for all valid control flow transitions during code generation or compilation. These control words are embedded into the code structure in advance, allowing the processor to perform simple lookup and comparison operations during runtime without executing complex verification algorithms, thereby reducing processing overhead while maintaining security.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent segments the control flow verification mechanism into distinct components: control words embedded in the code, initialization vectors stored separately, and a dedicated verification module. This segmentation allows the verification process to be distributed and optimized, reducing the burden on the main execution path and improving overall processing efficiency.

Inventive Principle:
Principle #1Segmentation

2Reliability

If control flow verification is performed at runtime, then detection of unauthorized transitions is improved, but execution speed decreases

Engineering Contradiction:
Improvedetection of unauthorized transitionsVSAvoidexecution speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The patent replaces complex runtime control flow analysis with a simplified mechanism based on precomputed control words and initialization vectors. Instead of performing heavy computational verification at runtime, the system uses straightforward comparison operations between pre-stored values and computed hashes, dramatically reducing the speed penalty while maintaining detection capability.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent changes the verification parameters from complex control flow graphs and path analysis to simple control word comparisons. By transforming the verification problem into a parameter-matching task using precomputed values, the system achieves fast verification that minimally impacts execution speed while maintaining reliable detection of unauthorized transitions.

Inventive Principle:
Principle #35Parameter changes

3Ease of operation

If the stack is made freely accessible for execution convenience, then ease of operation is improved, but vulnerability to stack-based attacks increases

Engineering Contradiction:
Improveexecution convenienceVSAvoidstack-based attacks
Core Design Contradiction:
Ease of operationVSObject-affected harmful factors

Solution Approach 1:

The patent introduces control words as an intermediary layer between the stack and the control flow verification mechanism. These control words act as mediators that allow normal stack operations to proceed freely while simultaneously providing the information needed to verify that control flow transitions are authorized. This intermediary mechanism preserves execution convenience while blocking stack-based attacks.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentEP2958044B1A computer implemented method and a system for controlling dynamically the execution of a code
Publication Date: 2019.09.18 SECURE IC
  • EP2958044B1 patent drawingFigure 1A~1B
  • EP2958044B1 patent drawingFigure 1C
  • EP2958044B1 patent drawingFigure 2A~2B

AI summary

According to the invention, there is provided a computer implemented method for controlling dynamically the execution of a code by a processing system, said execution being described by a control flow graph comprising a plurality of basic blocks composed of at least an input node and an output node, a transition in the control flow graph corresponding to a link between an output node of origin belonging to a first basic block and an input node of a second basic block, a plurality of initialization vectors being associated to the output nodes at the time of generating the code, an a priori control word being associated to each input node which is linked to the same output node of origin according the control flow graph, said a priori control word being precomputed at the time of generating the code by applying a predefined deterministic function F to the initialization vector associated to its output node of origin, the following steps being applied once the execution of the output node belonging to a first basic block is terminated and at the time of executing the input node of a second basic block: providing (300) the a priori control word associated to the input node of the second basic block; providing (301) the initialization vector associated to the output node of the first basic block; determining (302) an a posteriori control word by applying to the provided initialization vector the same function F which has been used for generating the a priori control word; determining (303, 304) if the a priori control word matches with the a posteriori control word, a forbidden transition in respect to the control flow graph being otherwise detected (305).