Validating Untrusted Native Code via Static Binary Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for executing untrusted native code on computing devices often sacrifice performance, safety, or portability, as they rely on inadequate security mechanisms that can lead to malicious behavior and security risks.
Innovation Solution
A system that validates native code modules by ensuring they do not include restricted instructions, access restricted features, and are properly aligned, allowing only safe execution within a secure runtime environment, thereby isolating the code from other programs and resources.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If interpreted languages or virtual machine execution environments are used to execute untrusted code, then security risks are reduced, but execution performance deteriorates
Solution Approach 1:
The patent introduces a secure runtime environment as an intermediary layer between the untrusted native code and the host system. This mediator validates the code through static binary analysis, enforces security policies during execution, and provides controlled access to system resources, thereby achieving both security and native performance without the overhead of interpretation or virtualization
Solution Approach 2:
The patent performs static binary analysis and validation of the native code module before execution begins. The validator checks for restricted instructions, verifies alignment, and ensures control flow integrity in advance, preventing malicious behavior before it can occur while allowing the code to execute natively without performance penalties
2Productivity
If native code is executed without validation to maintain performance, then execution speed is maintained, but security risks increase
Solution Approach 1:
The system performs validation of the native code module before execution through static binary analysis. The validator checks for restricted instructions, verifies byte alignment, and ensures control flow integrity in advance. Only after successful validation does the secure runtime environment permit native execution, thereby maintaining performance while eliminating security risks
Solution Approach 2:
The secure runtime environment continuously monitors the executing native code module and enforces security policies in real-time. It provides feedback by detecting and preventing unauthorized operations, such as attempts to execute restricted instructions or access forbidden resources, thereby maintaining security during high-performance native execution
3Reliability
If static binary analysis and validation are performed on native code modules, then security is improved, but device complexity increases
Solution Approach 1:
The patent divides the system into distinct functional components: the validator performs static binary analysis separately from the secure runtime environment that handles execution. This segmentation allows each component to be optimized independently and simplifies the overall architecture by clearly separating validation responsibilities from execution responsibilities
Solution Approach 2:
The secure runtime environment acts as an intermediary that manages the complexity of security enforcement. It implements a policy-based security model that automatically validates and controls native code execution without requiring complex manual configuration, thereby improving security while keeping the system manageable
Data Source
AI summary
A system that validates a native code module. During operation, the system receives a native code module comprised of untrusted native program code. The system validates the native code module by: (1) determining that code in the native code module does not include any restricted instructions and/or does not access restricted features of a computing device; and (2) determining that the instructions in the native code module are aligned along byte boundaries such that a specified set of byte boundaries always contain a valid instruction and control flow instructions have valid targets. The system allows successfully-validated native code modules to execute, and rejects native code modules that fail validation. By validating the native code module, the system facilitates safely executing the native code module in the secure runtime environment on the computing device, thereby achieving native code performance for untrusted program binaries without significant risk of unwanted side effects.


