IP Library Granted Patent US 9,075,625
Granted Patent B1
US 9,075,625 · App. 14/466,311 · Granted Jul 7, 2015

Predicated control flow and store instructions for native code module security

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,075,625
App. No.
14/466,311
Granted
Jul 7, 2015
Kind
B1
Abstract

Some embodiments provide a system that executes a native code module. During operation, the system obtains the native code module. Next, the system loads the native code module into a secure runtime environment. Finally, the system safely executes the native code module in the secure runtime environment by using a set of software fault isolation (SFI) mechanisms that use predicated store instructions and predicated control flow instructions, wherein each predicated instruction from the predicated store instructions and the predicated control flow instructions is executed if a mask condition associated with the predicated instruction is met.

Claims (53)

1. A computer-implemented method for executing a native code module, comprising:

obtaining, by a computing system, the native code module;

validating, by the computing system, that the native code module meets a set of execution security requirements, wherein the validating includes:

identifying direct control flow instructions in the native code module whose respective target addresses are statically determinable before the native code module is executed,

verifying that the respective target addresses of the direct control flow instructions correspond to valid instructions,

identifying indirect control flow instructions in the native code module whose respective target addresses are determined during execution of the native code module,

verifying that the respective target addresses of the indirect control flow instructions satisfy a mask condition that indicates a valid range of target addresses, and

setting one or more processor condition codes that control execution of the identified indirect control flow instructions in response to verifying that the respective target addresses of the indirect control flow instructions satisfy the mask condition;

loading the native code module into a secure runtime environment of the computing system; and

safely executing the native code module in the secure runtime environment.

2. The computer-implemented method of claim 1 , wherein executing the native code module in the secure runtime environment includes executing the native code module according to an Advanced Reduced Instruction Set Computing (RISC) Machine (ARM) instruction set architecture.

3. The computer-implemented method of claim 1 , wherein validating that the native code module meets the set of execution security requirements comprises performing static binary analysis of the native code module before the native code module is executed.

4. The computer-implemented method of claim 1 , wherein the native code module is executed in response to at least partially validating that the native code module meets the set of execution security requirements.

5. The computer-implemented method of claim 1 , wherein the validating is at least partially performed during execution of the native code module.

6. The computer-implemented method of claim 1 , wherein at least one of the direct control flow instructions and the indirect control flow instructions comprises a branch instruction or a store instruction.

7. The computer-implemented method of claim 1 , wherein:

a first target address of the indirect control flow instructions is a computed destination address, and

verifying the first target address comprises comparing the computed destination address with a predetermined address constraint.

8. The computer-implemented method of claim 7 , wherein comparing the computed destination address with the predetermined address constraint comprises performing a notational-and instruction that logically compares a first set of bits from the mask condition with a second set of bits from the computed destination address.

9. The computer-implemented method of claim 8 , wherein the one or more processor condition codes comprise a zero flag that is set if the notational-and instruction returns a set of zero bits.

10. The computer-implemented method of claim 1 , wherein the secure runtime environment is provided by a web browser, wherein executing the native code module in the secure runtime environment comprises moderating access to resources of the computing system according to an access policy associated with the native code module.

11. A non-transitory computer-readable medium having instructions stored thereon that, when executed by one or more processors, cause performance of operations comprising:

obtaining a native code module;

validating that the native code module meets a set of execution security requirements, wherein the validating includes:

identifying direct control flow instructions in the native code module whose respective target addresses are statically determinable before the native code module is executed,

verifying that the respective target addresses of the direct control flow instructions correspond to valid instructions,

identifying indirect control flow instructions in the native code module whose respective target addresses are determined during execution of the native code module,

verifying that the respective target addresses of the indirect control flow instructions satisfy a mask condition that indicates a valid range of target addresses, and

setting one or more processor condition codes that control execution of the identified indirect control flow instructions in response to verifying that the respective target addresses of the indirect control flow instructions satisfy the mask condition;

loading the native code module into a secure runtime environment; and

safely executing the native code module in the secure runtime environment.

12. The non-transitory computer-readable medium of claim 11 , wherein executing the native code module in the secure runtime environment includes executing the native code module according to an Advanced Reduced Instruction Set Computing (RISC) Machine (ARM) instruction set architecture.

13. The non-transitory computer-readable medium of claim 11 , wherein validating that the native code module meets the set of execution security requirements comprises performing static binary analysis of the native code module before the native code module is executed.

14. The non-transitory computer-readable medium of claim 11 , wherein the native code module is executed in response to at least partially validating that the native code module meets the set of execution security requirements.

15. The non-transitory computer-readable medium of claim 11 , wherein the validating is at least partially performed during execution of the native code module.

16. The non-transitory computer-readable medium of claim 11 , wherein at least one of the direct control flow instructions and the indirect control flow instructions comprise a branch instruction or a store instruction.

17. The non-transitory computer-readable medium of claim 11 , wherein:

a first target address of the indirect control flow instructions is a computed destination address, and

verifying the first target address comprises comparing the computed destination address with a predetermined address constraint.

18. The non-transitory computer-readable medium of claim 17 , wherein comparing the computed destination address with the predetermined address constraint comprises performing a notational-and instruction that logically compares a first set of bits from the mask condition with a second set of bits from the computed destination address.

19. The non-transitory computer-readable medium of claim 18 , wherein the one or more processor condition codes comprise a zero flag that is set if the notational-and instruction returns a set of zero bits.

20. A computer system, comprising:

one or more processors:

a computer-readable medium having instructions stored thereon that, when executed by the one or more processors, cause performance of operations comprising:

obtaining a native code module;

validating that the native code module meets a set of execution security requirements, wherein the validating includes:

identifying direct control flow instructions in the native code module whose respective target addresses are statically determinable before the native code module is executed,

verifying that the respective target addresses of the direct control flow instructions correspond to valid instructions,

identifying indirect control flow instructions in the native code module whose respective target addresses are determined during execution of the native code module,

verifying that the respective target addresses of the indirect control flow instructions satisfy a mask condition that indicates a valid range of target addresses, and

setting one or more processor condition codes that control execution of the identified indirect control flow instructions in response to verifying that the respective target addresses of the indirect control flow instructions satisfy the mask condition;

loading the native code module into a secure runtime environment; and

safely executing the native code module in the secure runtime environment.

Assignments (2)
CHANGE OF NAME Recorded Oct 2, 2017
From: GOOGLE INC.
To: GOOGLE LLC
Reel/Frame 044334/0466 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 7, 2014
From: MUTH, ROBERT; SCHIMPF, KARL M.; SEHR, DAVID C.; BIFFLE, CLIFF L.
To: GOOGLE INC.
Reel/Frame 034127/0438 →