Static Machine Code Validation Using Graphs for Misaligned Instructions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for static analysis of machine code to detect policy violations are challenging due to variable instruction lengths and indirect control flow transitions, making it difficult to identify valid instruction sequences and detect attacks like Return-oriented programming (ROP) and Call-oriented programming (COP).

Innovation Solution

A three-phase approach is employed to generate a control flow graph from misaligned instruction sequences, involving scanning for entry points, constructing a directed control flow graph, and applying customizable security policies to validate machine code statically without execution, using a processor's instruction set architecture (ISA).

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If static analysis is used to validate machine code for security properties, then security validation capability is improved, but analysis accuracy deteriorates due to variable instruction lengths and indirect control flow transitions

Engineering Contradiction:
Improvesecurity validation capabilityVSAvoidanalysis accuracy
Core Design Contradiction:
ReliabilityVSMeasurement precision

Solution Approach 1:

The patent segments the machine code into fixed-size instruction windows (e.g., 15 bytes) and processes each window independently to identify potential instruction sequences. This segmentation approach transforms the complex variable-length instruction parsing problem into manageable fixed-size analysis units, enabling systematic static validation while maintaining accuracy in detecting valid instruction boundaries and control flow transitions.

Inventive Principle:
Principle #1Segmentation

2Measurement precision

If dynamic binary translation is used to establish security boundaries, then validation accuracy is improved, but execution speed deteriorates

Engineering Contradiction:
Improvevalidation accuracyVSAvoidexecution speed
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent performs preliminary static analysis of machine code during the loading or compilation phase, generating control flow graphs and validating security properties before actual execution. This preliminary validation identifies potential security violations upfront, allowing the system to reject malicious code without incurring runtime overhead, thus maintaining both high accuracy and execution speed.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent replaces the mechanical runtime interpretation approach of dynamic binary translation with a static analysis mechanism that uses pattern matching and control flow graph construction. This substitution eliminates the need for slow runtime code translation while maintaining validation accuracy through systematic analysis of instruction sequences and control flow patterns.

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

3Reliability

If comprehensive static analysis is performed on all code, then security coverage is improved, but computational complexity deteriorates

Engineering Contradiction:
Improvesecurity coverageVSAvoidcomputational complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent applies local quality analysis by focusing computational resources on critical security-relevant regions of the code, such as control flow transitions, function entry/exit points, and indirect jump targets. Rather than uniformly analyzing every instruction, the system identifies and intensively analyzes only those regions most susceptible to security violations like ROP and COP attacks, reducing overall computational complexity while maintaining comprehensive security coverage.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent implements partial analysis by applying static validation selectively to code regions that require security verification, such as untrusted code segments or dynamically loaded libraries, rather than uniformly analyzing the entire codebase. This partial action approach concentrates computational effort where it is most needed, achieving effective security coverage without the prohibitive complexity of analyzing all code comprehensively.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS20250245347A1Static validation of machine code for security properties
Publication Date: 2025.07.31 ORACLE INT CORP
  • US20250245347A1 patent drawing
  • US20250245347A1 patent drawing
  • US20250245347A1 patent drawing

AI summary

Novel graph analytics herein detect security violations in machine code. Here is static validation of machine code for detecting policy violations in an accelerated way that analytically generates a control flow graph from misaligned sequences of instructions that may, for example, partially overlap (i.e. share some of the bytes) in a memory buffer. In a first analytic phase, entry points into machine code are discovered. The entry points are starting points of control flow analysis that generates a directed control flow graph (CFG) in a second analytic phase. In a third analytic phase, interchangeable and combinable security policies implement the graph analytics in a flexible way that can be customized for a processor and its instruction set architecture (ISA). This approach will quantifiably increase the reliability of a computer that executes untrusted code such as an open source library or tenant logic in a multitenant environment such as a public cloud.