Binary Translation for Native Client Sandboxing
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Adaptability or versatility
If full binary translation is performed, then software compatibility is improved, but translation time and computational resources increase
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.
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.
3Adaptability or versatility
If asynchronous signals are emulated in the sandboxing environment, then software functionality is improved, but system complexity and resource overhead increase
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.
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.
Data Source
Figure 1A
Figure 1B
Figure 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.