Binary Translation for Native Client Sandboxing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing binary translation techniques fail to securely execute software on different CPU architectures, particularly when asynchronous signals are not available on the host platform, and require significant effort to recompile and port software to Native Client.

Innovation Solution

The technology employs binary translation to convert guest code into Native Client compatible machine code, using optimization techniques like just-in-time software fault isolation, emulation of guest registers, and signal handling to ensure secure and portable execution within a sandbox environment, even without native support for asynchronous signals.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If binary translation is used to execute software on different CPU architectures, then software compatibility is improved, but security and reliability deteriorate due to the complexity of translation layers

Engineering Contradiction:
Improvesoftware compatibilityVSAvoidexecution security
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The translation process is segmented into just-in-time compilation of individual basic blocks, allowing each segment to be verified and sandboxed independently. This modular approach maintains security while enabling cross-architecture execution.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A sandboxed translation layer acts as an intermediary between the guest binary and host system, isolating the untrusted guest code from the host while providing controlled access to host resources through explicit interface definitions.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If full binary translation is performed, then software compatibility is improved, but translation time and computational resources increase

Engineering Contradiction:
Improvesoftware compatibilityVSAvoidtranslation time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The system performs preliminary analysis to identify and cache translation rules for common instruction patterns and basic blocks. When the same patterns are encountered during execution, the pre-computed translations are reused, significantly reducing translation time.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Instead of translating the entire binary upfront, the system translates only the necessary basic blocks just-in-time when they are executed, performing partial translation to reduce overall translation time while maintaining compatibility.

Inventive Principle:
Principle #16Partial or excessive action

3Adaptability or versatility

If asynchronous signals are emulated in the sandboxing environment, then software functionality is improved, but system complexity and resource overhead increase

Engineering Contradiction:
Improvesignal handling capabilityVSAvoidsignal emulation complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The system creates a simplified copy of the signal handling mechanism within the sandbox, implementing only the essential signal delivery and handling functionality needed by guest programs, rather than fully emulating the host's complex signal system.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The signal emulation system changes the parameter representation of signals, using simplified signal identifiers and handling mechanisms that map guest signal concepts to host implementation details, reducing the complexity of cross-platform signal handling.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP3281105B1Binary translation into native client
Publication Date: 2023.10.25 GOOGLE LLC
  • EP3281105B1 patent drawingFigure 1A
  • EP3281105B1 patent drawingFigure 1B
  • EP3281105B1 patent drawingFigure 2

AI summary

Systems and methods for binary translation are disclosed. In some implementations, guest software to run in a Native Client environment is received. The guest software is configured to execute at a specified guest hardware architecture and not within the Native Client environment. A binary translation of the guest software into Native Client compatible machine code is provided using emulation software. The Native Client compatible machine code executes within a sandbox for the Native Client environment. The Native Client compatible machine code is executable within an application. Providing the binary translation of the guest software into the Native Client compatible machine code for execution within the sandbox occurs just in time, during a runtime of the emulated guest software, and without porting or recompiling the guest software. Providing the binary translation interleaves with execution of the emulated guest software.